Shell
Shell
One reason the shell might not be able to find the executable file is that it is
not in a directory listed in the PATH variable. Under bash the following command
temporarily adds the working directory (.) to PATH:
$ PATH=$PATH:.
Standard output is a place to which a program can send information (e.g., text).
The program never “knows” where the information it sends to standard output is
going.
Standard input is a place a program gets information from; by default, the shell
directs standard input from the keyboard.
In addition to standard input and standard output, a running program has a place to
send error messages: standard error.
Linux has an additional type of file: a device file. A device file resides in the
file structure, usually in the /dev directory, and represents a peripheral device,
such as a terminal, printer, or disk drive.
The redirect output symbol (>) instructs the shell to redirect the output of a
command to the specified file instead of to the screen (Figure 5-6). The syntax of
a command line that redirects output is
command [arguments] > filename
The redirect input symbol (<) instructs the shell to redirect a command’s input to
come from the specified file instead of from the keyboard (Figure 5-9). The syntax
of a command line that redirects input is
command [arguments] < filename