On 2 May 2013 17:24, erik quanstrom <quans...@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