Redirecting your intents

Ξ June 27th, 2010 | → | ∇ Tools |

command > filename

redirects the stdout from ‘command’ to a file called ‘filename’. The file shall be created if not present, or otherwise overwritten.

> filename
: > filename

are a special case of redirection, creating a zero-lenght file. The ‘:’ is a dummy placeholder that generates no content - usually used when the first form is not allowed by the shell.

command >> filename

also redirects the stdout to file, but the content is appended to file in the file already exists.

note: pre-pending 1, 2 or & will redirect stdout, stderr or both , according to the redirection ‘operator’ (>, >>).

 

Leave a reply


On the nightstand...


    The Art of Agile Development


    Beautiful Architecture


    Modern C++ Design


    Large Scale C++ Software Design

Personal

Friends


Interesting


Shared Readings