[TriLUG] solved: HERE document question
Kevin Hunter
hunteke at earlham.edu
Sun Aug 1 01:01:27 EDT 2010
At 8:56am -0600 Sat, 31 Jul 2010, Joseph Mack NA3T wrote:
> Sorry about the long lines - I expect screens to be at least 132 chars.
Bad expectation. Generally, for interoperability with other people,
editors, and any odd or end of tools, assume 80 chars. Has been the de
facto standard since the days of punch cards or before. For instance,
I'm a poor grad student with but a small laptop screen. 132 characters
doesn't wrap so well, and scrolling was obnoxious.
> I have the correct working file output by the HERE document
> statements, followed by the code that generated it.
I'm confused. So you have it working the way you want now? Since you
pasted it, I'm assuming not. Notes:
- You don't need multiple EOFs. The point of EOFs is to make blocks of
output easier to read in the source code, and to allow grouping of
multiple outputs into a single one.
- If I've understood correctly what you want, the only real trick you
need is recognizing how to use an escaping backslash. (Lines 29 and 30)
- Since you're generating a script with a script, consider a adding a
WARNING line as a comment. You'll thank yourself in 6 months when you
need to look at this script again.
Other than that, it looks like you already had it working. Example
changes to illustrate what you might have done:
http://dpaste.com/223883/
Kevin
More information about the TriLUG
mailing list