Marc Perkel <[email protected]> (So 12 Dez 2010 23:26:54 CET):
> > in bash:
> >
> > $ cat test.txt | sort | uniq -c | while read line; do count=${line% *}; if
> > [ $count -ge 3 ]; then echo ${line/*$count /}; fi; done
> > four
> > three
> > $
> >
> > Cheers,
> 
> Thanks but I'm getting "too many arguments" on
> 
> [ $count -ge 3 ];

If you quote $count 

    [ "$count" -ge 3 ]

the error will disappear. But this would fix just the symptom, as any
line should have a count prepended.

-- 
Heiko :: dresden : linux : SCHLITTERMAN.de
GPG Key 48D0359B : 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B

Attachment: signature.asc
Description: Digital signature

-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to