Oh, didn't know about -c. I usually just pipe to wc -l I guess.
Oh, didn't know about -c. I usually just pipe to wc -l I guess.
Oh, didn't know about -c. I usually just pipe to wc -l I guess.
-c, -l, -h, -H, and -q are my favorite #grep flags. :D
Huh, that almost became a [Marcel Duchamp] reference. 😅
I just use -v and -E
oh yeah, -E is important. I sometimes use -F for convenience, it's rarely ever faster.
-q is great for use in scripts, like
if some_command |grep -q some_regex; then
It makes the script read very fluidly.
Of course, you should just do if some_command &>/dev/null if the command sends a positive return code on failure, but not all do.
...and bash instead of zsh
...and grep/awk/sed instead of jq
...and firefox instead of chrome
...and the fediverse instead of facebook
Face it... I'm an unpopular-opinion neckbeard level boss. XD
cc: @mirabilos
@rl_dane you need "$@"
@rl_dane yes. And absolutely no, do not touch IFS for this.
"$@" basically means “pass the argv array as-is”.
@rl_dane it becomes equivalent to $* without double quotes