February 2001
Beginner to intermediate
448 pages
9h 2m
English
If you are starting to feel comfortable with stdout redirection after our second visit, let's build further on that by briefly revisiting stderr redirection. Just as you might want a file full of the stdout produced by your script, or produced by a command, you also might want a file full of the error messages produced by your script. Not that you are going to want to print it out and hang it on the refrigerator, but you might want to produce a log of bad input records, erratic processing, or other exceptional events.
Don't worry, in Chapter 12, “Traps,” you learn ways to control the default action of the Korn Shell when it experiences certain errors or is sent certain signals. Consider the following example.
$ find / -name ...
Read now
Unlock full access