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 her

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 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 docs 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 Mon, May 6, 2013 at 9:27 AM, Rudolf Sykora 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 <

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

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 <

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

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

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 <[2]/dev/null > } > } > 2c > $i > . > w > q i usually solve this problem like this for(i in 1 2){ mkdir -p $i || fatal cp

[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 <[2]/dev/null } } 2c $i . w q EOF and I wanted to have the 2nd line of individu