Establishing Output Files

Establishing Output Files:

When a script interacts with a program, an output for its results must be established. In general, commands handle output in one of three ways:

1. All output will be written to standard output (STDOUT). This is simply the terminal when running directly, and the standard output/error files when run via a batch job.  This output can be redirected to the file using the bash shell (e.g., echo 'hello world' > output.txt)

2. Output is written to file(s) specified on the command line. How exactly files are specified will be in the program's documentation.  

3. Output is written to files as specified in the program's documentation. This depends on the individual specifications of the program itself, which may or may not allow the user to specify a directory for writing output files to other than the current working directory.