Input/output redirection Flashcards
1
Q
What constitute the standard streams?
A
Standard input (stdin), standard output (stdout) and standard error (stderr).
2
Q
Stdin from file?
A
mycommand
3
Q
Stdout to file (create, overwrite)?
A
mycommand > outfile
4
Q
Stdout to file (append)?
A
mycommand»_space; outfile
5
Q
Stderr to file (create, overwrite)?
A
mycommand 2> errorfile
6
Q
Stdout and stderr to different files (create, overwrite)?
A
mycommand > outfile 2> errorfile
7
Q
Stdout and stderr to the same files (create, overwrite)?
A
mycommand &> outfile