December 2008
Intermediate to advanced
320 pages
6h 45m
English
There are many ways to send script output to the screen or to a file. The technique demonstrated in this chapter for creating preformatted output is simple to code. Many times I have coded scripts that write entries to a log, create a configuration file, or generate formatted usage output one line at a time by redirecting the output of echo statements. This works perfectly well, but the code looks a bit ugly and becomes tedious; it is also laborious to make changes because each echo statement has to be formatted individually.
The original version of the gold Linux build script in Chapter 38 was written in that way. It created a temporary file used to partition a hard disk by outputting each partition table ...
Read now
Unlock full access