this post was submitted on 11 Jan 2026
370 points (92.8% liked)
Programmer Humor
28409 readers
1978 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
history | grep -E '(sed|grep|awk|perl)' | wc -l107Dang. That's out of 1000. I need to up my game. Also three of those
seds are part of something with a-basedirand don't count.So yeah, about 10% of my commands are iterating shell pipe things for poops and giggles, I guess.
... and this got me going down the rabbit hole of writing a filter for my history to pull out the first command on the line. This is non-trivial because of potential preceding variable assignments. Most used commands are currently
aptandmanandls. I thinkaptis a Spiders Georg situation because the system is fairly fresh and I keep finding things that I haven't installed yet. Also I went through a patch of trying to parse its output.... oh, er... unga bunga.
I just use nushell’s builtins instead of wrangling with
IFSand bash idiosyncrasies. It's been years since I've corrupted data by parsing text wrong.But even if someone doesn't want that: apart from using it in legacy scripts,
grepis just a strictly less usefulripgrepthese days, no?Checks out perfectly.