Sujet : Re: Useless Use Of Regexes
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.os.linux.miscDate : 13. Apr 2025, 05:54:28
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vtfg23$24pic$2@dont-email.me>
References : 1 2 3 4 5 6 7 8
User-Agent : Pan/0.162 (Pokrosvk)
On 12 Apr 2025 11:23:14 GMT, Stéphane CARPENTIER wrote:
Yes. And then, I have to remove "cat". And only then can I write "grep".
Which is more difficult than just writing "| grep" at the end of the
line.
Let’s see:
* CTRL/A, DEL, DEL, DEL, “grep” (8 keystrokes)
versus
* “|grep” (5 keystrokes)
That’s 60% more work. I suppose that’s a big chunk out of your working
day ...
Here’s an even more useless example:
cat «file» | grep «pattern» | wc -l
versus
grep -c «pattern» «file»