Redirection (computing) - Redirecting Standard Input and Standard Output

Redirecting Standard Input and Standard Output

Redirection is usually implemented by placing certain characters between commands. Typically, the syntax of these characters is as follows:

command1 > file1

executes command1, placing the output in file1. This will clobber any existing data in file1.

To append output to the end of the file, use the >> operator:

command1 >> file1

Using

command1 < file1

executes command1, with file1 as the source of input (as opposed to the keyboard).

command1 < infile > outfile

combines the two capabilities: command1 reads from infile and writes to outfile

Read more about this topic:  Redirection (computing)

Famous quotes containing the words standard, input and/or output:

    A disposition to preserve, and an ability to improve, taken together, would be my standard of a statesman.
    Edmund Burke (1729–1797)

    Celebrity is a mask that eats into the face. As soon as one is aware of being “somebody,” to be watched and listened to with extra interest, input ceases, and the performer goes blind and deaf in his overanimation. One can either see or be seen.
    John Updike (b. 1932)

    Lizzie Borden took an axe
    And gave her mother forty whacks;
    When she saw what she had done,
    She gave her father forty-one.
    —Anonymous. Late 19th century ballad.

    The quatrain refers to the famous case of Lizzie Borden, tried for the murder of her father and stepmother on Aug. 4, 1892, in Fall River, Massachusetts. Though she was found innocent, there were many who contested the verdict, occasioning a prodigious output of articles and books, including, most recently, Frank Spiering’s Lizzie (1985)