goelweb.com --> Software --> Unix utilities --> Unix shell --> Shell I/O Redirections
Shell I/O Redirections
- >file
- direct standard output to file
- >>file
- append standard output to file
- <file
- take standard input from file
- p1|p2
- connect standard output of program p1 to input of p2
- ^
- obsolete synonym for |
- n>file
- direct output from file descriptor n to file
- n>>file
- append output from file descriptor n to file
- n>&m
- merge output from file descriptor n with file descriptor n
- n<&m
- merge input from file descriptor n with file descriptor n
- <<s
- here document: take standard input until next s at beginning of a line; substitute for $, `...`, and \
- <<\s
- here document with no substitution
- <<'s'
- here document with no substitution
rishi.goel@alumni.usc.edu