where did you put the redirection? i'd have thought that this would work ok (note the added braces):
{for (i in *_r) @{cd $i; echo -n $i^' '; grep total otdit | grep -v na}} > res 2009/5/5 Rudolf Sykora <rudolf.syk...@gmail.com>: > Hello everyone! > > To get some useful information from a file I write: > > ; for (i in *_r) @{cd $i; echo -n $i^' '; grep total otdit | grep -v na} > > to get lines from the 'otdit' files in *_r subdirectories with the > word 'total' on them, but no 'na' on them. This works to my liking and > produces sth. like > > 10_r total : 9.4105E-01 > 11_r total : 9.3897E-01 > 12_r total : 9.3685E-01 > 13_r total : 9.3446E-01 > 14_r total : 9.3180E-01 > 15_r total : 9.2890E-01 > 16_r total : 9.2589E-01 > 17_r total : 9.2299E-01 > 18_r total : 9.1860E-01 > ... > 9_r total : 9.4317E-01 > > Ok, now I wanted to save this, so I naively appended '> res'. But then > the contents of 'res' was only the last line: > 9_r total : 9.4317E-01 > > Ok, so I thought '>> res' should be used instead. But then I got sth. like > > ];/home/sykora/CALC/doing/tests/9_r/-xeon4 9_r total : 9.4317E-01 > ];/home/sykora/CALC/doing/tests/10_r/-xeon4 10_r total : > 9.4105E-01 > ];/home/sykora/CALC/doing/tests/11_r/-xeon4 11_r total : > 9.3897E-01 > ];/home/sykora/CALC/doing/tests/12_r/-xeon4 12_r total : > 9.3685E-01 > ];/home/sykora/CALC/doing/tests/13_r/-xeon4 13_r total : > 9.3446E-01 > ];/home/sykora/CALC/doing/tests/14_r/-xeon4 14_r total : > 9.3180E-01 > ];/home/sykora/CALC/doing/tests/15_r/-xeon4 15_r total : > 9.2890E-01 > ];/home/sykora/CALC/doing/tests/16_r/-xeon4 16_r total : > 9.2589E-01 , > > which quite surprised me... Can you tell me why this happens? I am running > p9p. > > Thanks > Ruda > >