9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Rudolf Sykora <rudolf.sykora@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] problem with a here document in rc
Date: Thu,  2 May 2013 17:48:03 +0200	[thread overview]
Message-ID: <CAOEdRO1Z88zb9mqpmEus_3V0mTwCYEfB2sNK-gcJ3t+uF6mVng@mail.gmail.com> (raw)
In-Reply-To: <ba51b53bc89d1beb6c6c68c0371dfcc4@ladd.quanstro.net>

On 2 May 2013 17:24, erik quanstrom <quanstro@quanstro.net> wrote:
> i usually solve this problem like this
>
>         for(i in 1 2){
>                 mkdir -p $i || fatal
>                 cp POSCAR $i || fatal
>                 @{
>                         {
>                                 echo 2c
>                                 echo $i
>                                 echo .
>                                 echo w
>                                 echo q
>                         } | ed POSCAR
>                 }
>         }
>
> - erik


So you avoid a here document...
Then, is it so that a here document can't ever serve the purpose (ie.
it is limited in the way that any present variables are evaluated just
once; when then?)?

Thanks for a clarification!
Ruda



  reply	other threads:[~2013-05-02 15:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02 13:22 Rudolf Sykora
2013-05-02 15:24 ` erik quanstrom
2013-05-02 15:48   ` Rudolf Sykora [this message]
2013-05-06  7:27     ` Rudolf Sykora
2013-05-06 13:37       ` erik quanstrom
2013-05-07 20:40       ` Martin Kühl
2013-05-07 22:08         ` erik quanstrom
2013-05-08  2:53           ` Martin Kühl
2013-05-08  3:02             ` erik quanstrom

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=CAOEdRO1Z88zb9mqpmEus_3V0mTwCYEfB2sNK-gcJ3t+uF6mVng@mail.gmail.com \
    --to=rudolf.sykora@gmail.com \
    --cc=9fans@9fans.net \
    /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).