from your example, i'm not so sure why this
{
echo select $blah blah';'
echo $imbibe_rat_urine
}|mysql --blah-blah
is so terrible.
It's not, but it's still uglier ...
it turns out that you can use a here document in a loop
; for(i in 1 2 3)
cat <<!
fu
!
fu
fu
fu
Close, but no coconut. What does:
for(i in 1 2 3)
cat <<!
$i
!
do?
but it doesn't work if you use curly braces
Yeesh! Nice detective work!
I see from later detective work it does work, but not in an obvious way:
IIRC sh slurped all the pending heredocs in orders when the lexer(!)
saw an unquoted newline,
which makes much more sense, but not in a syntactic way, IYSWIM.
since nobody's bothered to fix this, it's likely that it's just not
used
very much.
You're totally right.
OTOH, looking at rc has given me a bit of a software itch ...
I keep thinking "There's gotta be a neater/cleaner/faster way to do
here documents, argument parsing, globbing, ...".
My "need" for a plan9 system to scratch that itch is increasing:-) ...
DaveL