From: dave.l@mac.com
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] late to the party - Here docs
Date: Thu, 8 Nov 2007 00:37:17 +0000 [thread overview]
Message-ID: <276D99AB-6285-4ED0-BEB6-6033428AD660@mac.com> (raw)
In-Reply-To: <56beac6b65153d337a33b24e20172a60@quanstro.net>
> 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
next prev parent reply other threads:[~2007-11-08 0:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-06 20:31 maht-9fans
2007-11-06 21:07 ` erik quanstrom
2007-11-07 16:41 ` dave.l
2007-11-07 20:19 ` erik quanstrom
2007-11-07 21:20 ` geoff
2007-11-07 21:23 ` erik quanstrom
2007-11-07 22:58 ` Martin Neubauer
2007-11-07 23:04 ` erik quanstrom
2007-11-07 23:24 ` Martin Neubauer
2007-11-08 0:37 ` dave.l [this message]
2007-11-08 1:21 ` Gregory Pavelcak
2007-11-06 21:54 ` arisawa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=276D99AB-6285-4ED0-BEB6-6033428AD660@mac.com \
--to=dave.l@mac.com \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).