Re:Ask HN: Can I see your scripts?
by ansible on Monday August 15, 2022 @11:02AM
(#32470562)
I use find and grep a lot in code repos, so I came up with this bash function:
The "${@}" is the critical bit that allows me to pass arguments like -i to grep. The grep, find and xargs commands all support using a NULL as a file separator instead of whitespace.
[ Parent
| on HN ]
Ever used ack?
No, but thanks for pointing out its existence. Homepage:
Re:Ask HN: Can I see your scripts?
by Beltalowda on Saturday August 20, 2022 @12:57AM
(#32529203)
the_silver_searcher and ripgrep are similar (and inspired by Ack). I switched from ack to the_silver_searcher years ago as it's quite a bit faster (or was at the time anyway, not sure how fast Ack is now), and then to ripgrep because it has the -g option (only search files that match a pattern) that's handy sometimes.