|
|
Subscribe / Log in / New account

Shell Scripts

Shell Scripts

Posted May 5, 2010 14:05 UTC (Wed) by johill (subscriber, #25196)
In reply to: Shell Scripts by paulj
Parent article: Poettering: Rethinking PID 1

sed is faster than grep even for just grepping, at least last I checked it was.

sed 's/foo/\0/;t;d'


to post comments

Shell Scripts

Posted May 5, 2010 16:30 UTC (Wed) by martinfick (subscriber, #4455) [Link]

The beauty of running grep (or sed if you are so inclined) separately on large data sets is the inherent parallelism possible due to using unix pipes. This a feature often overlooked by modern programming techniques, the creators of unix made an elegant simple (much less error/deadlock prone than most others) parallelism mechanism long ago! With two cores, each one of those pipe commands can easily run in parallel.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds