From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 2 May 2013 17:48:03 +0200 Message-ID: From: Rudolf Sykora To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] problem with a here document in rc Topicbox-Message-UUID: 51087a1e-ead8-11e9-9d60-3106f5b1d025 On 2 May 2013 17:24, erik quanstrom 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