Log output

Log information messages (stdout)

To redirect the program output to a log file, simply use the shell '>' or '>>' operators. '>' overwrites the output file, whereas '>>' creates a new file or appends to an existing file. As a consequence, the latter should be used in the case of Batch processing.

Batch processing example, with output redirected to log.txt :

$ for f in *; do szdist -i $f -t rawstd -o ../pro/${f%".szr"}.csv >> log.txt; done

Log error output (stderr)

It is very convenient to redirect error output to a file when doing batch processing, since it allows to inspect the errors. Note the 2 !

$ for f in *; do szdist -i $f -t rawstd -o ../pro/${f%".szr"}.csv 2>> log.txt; done