Since I just learned and used all this stuff today, I think it deserves it's own node.

One of Unix' greatest strengths is it's use if I/O Rediection. You can tell a process where to get data from and where to ship it to all from the command like. Very usefull during debigging a process.

The basic redirection operators are:

  • Standard Out (stdout:):
    ls -l > file

  • Standard In (stdin):
    grep condition < file

  • Standard Error {stderr}: This deserves special information: Standard in and Stadard error are not the same thing. Redirecting stderr will not redirect stdin and vica-versa.

    csh/tcsh: ls non_existent_file* >& file_list
    sh/bash:ls -l non_existent_file* file_list 2>&1

There are are some very good nodes on each of these and many others: >> operator, > operator, << operator, < operator

Log in or register to write something here or to contact authors.