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$'
}
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$'
}
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
...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!
@sotolf @thedoctor @rl_dane @mirabilos
Mm, not really though? ripgrep is meant for bulk grepping of files
@sotolf @thedoctor @rl_dane @mirabilos
I mostly just use it to run rg TODO and see all the spots in a codebase I marked as still needing work.
@amin @sotolf @thedoctor @mirabilos
Why is ripgrep better than just grep -R?
@kabel42 @amin @sotolf @thedoctor @mirabilos
Interesting! I wonder what kind of algorithmic optimizations (as opposed to compiler optimizations) they're using to do that, and if regular (GNU/BSD) grep could do the same.
Because I'll wear clown shoes and a tutu before changing to a "rewrite the world in rust!" utility 😂
@kabel42 @rl_dane @amin @thedoctor @mirabilos Yeah, cheating as in Schummeln, not as in Betrügen.
I also saw now when looking the word up that it comes from german "juxen" which is "playing around, having fun" which is kind of a fun way that the word has been wandering :)
@sotolf @kabel42 @rl_dane @thedoctor @amin there’s meanings of to take a shortcut that aren’t related to cheating ;)
Consider a Venn diagram between both; they merely overlap, not subset.
@kabel42 @mirabilos @rl_dane @thedoctor @amin
English (Traditional)
English (Simplified)
@kabel42 @mirabilos @rl_dane @thedoctor @amin
Yeah the fucker that decided that "ennui" is a good word should be taken behind the shed...
@kabel42 @mirabilos @rl_dane @thedoctor @amin
It says ennui, is pronounced "ahn-wie" and just means "sadness" :p
@kabel42 @mirabilos @rl_dane @thedoctor @amin
Is english, but a loanword from french, which explains the fucked pronounciation :P
@kabel42 Sure because there's absolutely nothing weird about English spelling whatsoever.
@thedoctor @kabel42 @mirabilos @rl_dane @amin
It's like that in german as well, you have some words with a fucked up spelling, like Taille and Medaille, and of course they come from france, in Norwegian we did make them more sense spelling them "talje" and "medalje" :)
@sotolf @thedoctor @kabel42 @rl_dane @amin the Swiss use billett (with their usual emphasis on the first syllable), it’s french.
Dutch (possibly Flemish) is funny, rijbewijs or something like that…
@mirabilos @thedoctor @kabel42 @rl_dane @amin
Ah so they do that as well, one of the marks of my dialect in Norwegian is that we have emphasis always on the first syllable as well :) It's one of the reasons it's kind of easy for people to point at it to be silly and provintial :p
Dutch always have words that look ridiculous the first time you see them, until you try to sound it out and it starts making sense :p
@kabel42 @thedoctor @sotolf @rl_dane @amin yeah.
Funny thing, I only passed English classes at school because I could derive all¹ the fancy words from Latin, making the teacher think I actually know English…
① a sufficient amount, anyway
@mirabilos @kabel42 @thedoctor @rl_dane @amin
I don't actually know german either, I've just pretended enough around people here that they think they understand me :p
@sotolf @mirabilos @kabel42 @thedoctor @amin
So... you're basically speaking Norwegian with a German accent to your coworkers? ;)
@kabel42 @sotolf @mirabilos @thedoctor @amin
hah. ;)
Austro-Bavarian German with an accent
That sounds patently terrifying.
@thedoctor @rl_dane @mirabilos @kabel42 @brakeoutgaming
Well, it's a scandinavian accent :p so that's at least something.
@thedoctor @kabel42 @sotolf @mirabilos @amin
It's a tragedeigh. ;)
@rl_dane @thedoctor @kabel42 @sotolf @amin
/me imagines that spoken with a scottish accent and giggles
@mirabilos @thedoctor @kabel42 @sotolf @amin
Oh man, I wouldn't even know how to guess how a scot would attack that word. 🤭
^Wbeef, …)@sotolf @kabel42 @mirabilos @thedoctor @amin
That's funny, as it mainly means "boredom" in the original French.
Ok, seems that modern French ennui is a cognate to English ennui, not the source. The source is Old French, which has a meaning more similar to the modern English one.
@mirabilos @sotolf @kabel42 @thedoctor @amin
Eh? Boredom is a superpower! Us #GenXers know how to use it. ;)
@mirabilos @sotolf @kabel42 @thedoctor @amin
Well, that's one way of using boredom. Other ways are crafts, hobbies, plotting to take over the world, Pinky...
@kabel42 @mirabilos @sotolf @thedoctor @amin
N—no. Watching media doesn't count. I'm talking about things to do with boredom, not ways to avoid it.
Imagine you're a kid in the 1980s and there's only four channels on TV to watch. You have to find SOMETHING to do with that time. ;)
@alatartheblue @kabel42 @mirabilos @sotolf @thedoctor @amin
That's definitely a plausible outlet ;)