GNU bug report logs -
#70540
grep -c -r | grep -v ':0$'
Previous Next
Full log
Message #23 received at 70540 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Dale wrote:
> If these weren't ad-hoc activities, I would construct a careful pipeline
> like
>
> grep -c -r pattern directory | sort -t: -k2,2r | head -n3
>
> but for ad-hoc use, it seems to me that it's sensible and convenient to
> make the combination -c -l do what it intuitively "ought" to do, given
> that that change would be upward-compatible with Posix.
When I have frequently used cases like that, and get tired of just typing it all into a shell prompt over and over, I write a little wrapper command (perhaps in C, shell, Python or some combination) that encapsulates the repetitively useful details. My personal src and bin directories have hundreds of such commands, some dating as far back as early 1980's when I was at Bell Labs. (Though this habit can become annoying when I am on someone else's computer, and half the command lines I type at a shell prompt fail "command not found".)
--
Paul Jackson
jackson <at> fastmail.fm
[Message part 2 (text/html, inline)]
This bug report was last modified 1 year and 47 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.