Command Input & Output
Description
Redirecting Standard Output
| standard output default to the teminal | ||
| commandName -options arguments 1> destination | The long form, using the stream number | |
| commandName -options arguments > destination | The short form with no stream number | |
Redirecting Standard Error
| any error executing the command will outout to the standard error | ||
| commandName -options arguments 2> destination | Redirect standard error | |
| commandName -options arguments 1> out_destination 2> err_destination | Redirect standard error and standard output | |
Redirecting Standard Input
| Standard input is by default connected to the keyboard and because standard input is a data stream it can be redirected to a file or another data stream (standard output) | ||
| commandName -options arguments 0< destination | The long form, using the stream number | |
| commandName -options arguments < input_source | The short form with no stream number | |
Examples
