December 1999
Beginner
528 pages
11h 10m
English
A neat way of quickly identifying errors is first to direct the output to a file, then direct the errors to another file. Here’s an example.
I have two account files, one that contains information, another that does not (but I do not know this). I want to redirect both files to an output file called accounts.out.
$ cat account_qtr.doc account_end.doc 1> accounts.out 2> accounts.err
Now if I have errors, it will be contained in the file accounts.err.
$ pg accounts.out
AVBD 34HJ OUT
AVFJ 31KO OUT
...
$ pg accounts.err
cat: account_end.doc: No such file or directory
Without previously knowing if the second file ‘ account_end.doc ’ contained information, using the above redirection for output and errors ...
Read now
Unlock full access