The Korn shell provides a number of operators that can be used to manipulate command input/output, files, and co-processes.
<file | redirect standard input from file |
>file | redirect standard output to file. Create file if non-existent, else overwrite. |
>>file | append standard output to file. Create file if non-existent. |
>|file | redirect standard output to file. Create file if non-existent, else overwrite even if noclobber is set. |
<>file | open file for reading & writing as standard input |
<&– | close standard input |
>&– | close standard output |
<&n | redirect standard input from file descriptor n |
>&n | redirect standard output to file descriptor n |
n<file | redirect file descriptor n from file |
n>file | redirect file descriptor n to file |
n>>file | redirect file descriptor n to file. Create file if non-existent, else overwrite. |
n>|file | redirect file descriptor n to file. Create file if non-existent, else overwrite even if noclobber is set. |
n<&m | redirect file descriptor n from file descriptor m |
n>&m | redirect file descriptor n to file descriptor m |
n<>file | open file for reading & writing as file descriptor n |
n<<word | redirect to file descriptor n until word is read |
n<<–word | redirect to file descriptor n until word is read; ignore leading tabs |
n<&– | close file descriptor n for standard input |
n>&– | close file descriptor n for standard output |
n<&p | redirect input from co-process to file descriptor n. If n is not specified, use standard input. |
n>&p | redirect output of co-process to file descriptor n. If n is not specified, use standard output. |
3.133.134.17