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 ">".


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

./ > my_protocol

Table of Contents.