File this under #shell #functions I should have written years ago:

function grepc { #Do a grep -c, but skipping files with no results grep -c "$@" |grep -v ':0$' }

#unix #UnixShell #ShellScripting #bash #ksh

@rl_dane

Oh, didn't know about -c. I usually just pipe to wc -l I guess.

@amin

-c, -l, -h, -H, and -q are my favorite #grep flags. :D

Huh, that almost became a [Marcel Duchamp] reference. 😅

Marcel Duchamp - Wikipedia

@rl_dane

I just use -v and -E

@amin @rl_dane you guys use flags?... :p
@amin @rl_dane @sotolf You guys still use grep instead of ripgrep. Tst

@thedoctor @amin @sotolf

...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 Those are so not comparable!

@amin @sotolf @mirabilos

@thedoctor @rl_dane @amin @mirabilos At least bash and zsh is comparable to grep ripgrep, as zsh is just a strictly better bash ;)
@rl_dane @sotolf @amin @thedoctor strictly even slower 😹
@mirabilos @rl_dane @amin @thedoctor Well, I see you have never tried fish :p
@kabel42 @mirabilos @rl_dane @amin @thedoctor No, it's absolutely not fun, first of all it breaks all scripts. They break all the shortcuts that I use all the time in interactive sessions, it's slow, and if you want to configure it, guess how you configure a command line tool it boots up a web server where you configure it... the whole thing is utterly ridiculous.
@mirabilos @rl_dane @amin @thedoctor @sotolf you probably have some browser installed anyway so why not use it. And you can rewrite all your scripts in a new, more sane, language that is not based on some legacy tech. 
@rl_dane @thedoctor @kabel42 @sotolf @amin the Korn Shell language is neither legacy nor insane
@kabel42 @sotolf @rl_dane @amin @thedoctor also, I hate how "legacy" and "modern" are fighting words nowadays. Best to avoid them in polite conversation.

@mirabilos @kabel42 @rl_dane @amin @thedoctor

Legacy is mostly the safe route to go anyway, tried and tested, I am the one that gets called if shit stops working, and I'd rather have something I know and makes sense, with tons of resources of administrators of the before times having struggled with them to help me figure out what is going on. Rather than modern stuff, with their ai documentation, discord "forums" and shipping their whole pc (docker) because they couldn't get their shit to work on a clean system :p

@mirabilos @rl_dane @amin @thedoctor @sotolf legacy had old bugs that are well documented and no one dares to fix, modern has, too often, not learned from past mistakes