Re: [9fans] problem with a here document in rc

2013-05-07 Thread Martin Kühl
On Mon, May 6, 2013 at 9:27 AM, Rudolf Sykora rudolf.syk...@gmail.com wrote: Can the rc example be modified --- still using a here document --- so that it works? I guess I must be missing something, but this seems equivalent to your bash script: for(i in 1 2 3) { cat ! $i ! }

Re: [9fans] problem with a here document in rc

2013-05-07 Thread erik quanstrom
I guess I must be missing something, but this seems equivalent to your bash script: for(i in 1 2 3) { cat ! $i ! } clearly you did not run this script. this doesn't work for the same reason that here docs in functions don't work. - erik

Re: [9fans] problem with a here document in rc

2013-05-07 Thread Martin Kühl
On Wed, May 8, 2013 at 12:08 AM, erik quanstrom quans...@quanstro.net wrote: I guess I must be missing something, but this seems equivalent to your bash script: for(i in 1 2 3) { cat ! $i ! } clearly you did not run this script. this doesn't work for the same reason that here

Re: [9fans] problem with a here document in rc

2013-05-07 Thread erik quanstrom
clearly you did not run this script. this doesn't work for the same reason that here docs in functions don't work. I actually did, but accidentally ran the old unix port. sorry for the noise. ah, yes byron did make here documents work, and i think paul goaded him into adding here

Re: [9fans] problem with a here document in rc

2013-05-06 Thread Rudolf Sykora
Hello, so I repeat my question. While this is possible in bash: ;cat aBash for i in 1 2 3 do cat ! $i ! done ; ;bash aBash 1 2 3 ; it doesn't work in rc: ;cat aRc for(i in 1 2 3) { cat ! } $i ! ; ;rc aRc ; Is this as it should be? Can the rc example be modified --- still using a

Re: [9fans] problem with a here document in rc

2013-05-06 Thread erik quanstrom
Can the rc example be modified --- still using a here document --- so that it works? no. - erik

[9fans] problem with a here document in rc

2013-05-02 Thread Rudolf Sykora
Hello, I have a problem with writing correctly a here document in rc. I wrote, say: s = (1 2) for(i in $s) { mkdir -p $i cp POSCAR $i @{ cd $i ed POSCAR EOF [2]/dev/null } } 2c $i . w q EOF and I wanted to have the 2nd line of

Re: [9fans] problem with a here document in rc

2013-05-02 Thread erik quanstrom
s = (1 2) for(i in $s) { mkdir -p $i cp POSCAR $i @{ cd $i ed POSCAR EOF [2]/dev/null } } 2c $i . w q i usually solve this problem like this for(i in 1 2){ mkdir -p $i || fatal cp POSCAR $i

Re: [9fans] problem with a here document in rc

2013-05-02 Thread Rudolf Sykora
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