The Unix Shell - Part II
Introduction,Standard Input and Output.
IntroductionAt first glance many people think the Unix Shell is a more cryptic version of the MS-Windows/DOS command prompt. However, the Unix shell can do much more than launch programs and copy files. Sequences of commands can be strung together in "Shell Scripts" to automate tedious or repetitive tasks. Unix systems provide a series of tools that are helpful when writing shell scripts. Typically each tool performs a specific task, accepting input from the "standard input" source and sending its output to the "standard output source".
Standard Input and OutputNon-Graphical Unix programs typically read input from what is called the "standard input stream." When a program is started up from the command line, standard input (STDIN) defaults to the keyboard. Characters typed on the keyboard are sent to the program for processing. Similarly, the standard output (STDOUT) of a program started from the command line is the screen. Normal output destined for the user's screen is sent to STDOUT, but error messages are often sent to the standard error device (STDERR); by default STDERR goes to the screen as well. Sometimes you don't want program output to go to the screen; it might be more convenient to save to a file, or have your program read from a file. Redirection allows you to easily accomplish this.
- Skip Ahead
- 1. Introduction,Standard Input and Output.
- 2. Introduction,Standard Input and Output.
- 3. Introduction,Standard Input and Output.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.