Tutorial
Unix
The Shell


Unix

Shells / Command Line Iterpreters

Some Basic Commands

Output Redirection

Normally, the output of your program (i.e., output sent to cout in a C++ program) is sent to the screen. The shell provides the capability to redirect this output to a file (or other device):
	a.out >myresults.out
will send (redirect) the output of the program to the file myresults.out. Redirecting output allows you to capture the result of a program, making it easier to review (or in our case for me to look at). When you are done with an assignment, please make sure to run it again, redirecting your output to a file and placing it in the same directory as the assignment, thus allowing me to see the output without having to run the program.