Abstract
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.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsRights and permissions
Copyright information
© 2009 Ron Peters
About this chapter
Cite this chapter
(2009). Free-Format Output Using cat. In: Expert Shell Scripting. Apress. https://doi.org/10.1007/978-1-4302-1842-5_28
Download citation
DOI: https://doi.org/10.1007/978-1-4302-1842-5_28
Publisher Name: Apress
Print ISBN: 978-1-4302-1841-8
Online ISBN: 978-1-4302-1842-5
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books