Program Output

Redirection of standard output to a file

The print command we used above sent its argument to the standard output, which is normally the terminal screen.

A simple way to send program output to a file (instead of printing it on the screen) is to use the Unix redirection sign ">".

Example:

To print the results of the protocol.pl program to a file named my_protocol, use the following Unix command:

./protocol.pl > my_protocol


Table of Contents.
Next.