[Nottingham] Slow bash-ings for file line search

Martin martin at ml1.co.uk
Tue Apr 5 20:20:04 BST 2005


To tap into the collective intelligence andknowledge of arcanery -

What's faster in bash than this:

( echo "$ll" | grep "$s1" >/dev/null ) &&

I'm copying a text file line-by-line and wish to identify certain lines 
to conditionally modify. (Hence why not sed or grep.)

What I'd like is something like:

[ "$?" ] &&

Any ideas to get a speedup?


Martin Lomas
martin at ml1.co.uk

More information about the Nottingham mailing list