There are a few Unix command patterns I type out quite a lot more than any others. Every time I do so I wonder “isn’t there a better way of doing this?”. I know I could do better or use better tools but also, meh, who cares? It’s more important to be productive than to be right, right?
The classics, of course:
ls -larth
… | awk ‘{print $…}’
for f in … ; echo foo $f ; end | sh -x
(Weird to mix fish and sh, I know. Sue me!)Another one though is if I need some kind of random-ish seed for something like a cache key, or a hidden URL path directory, or the password for the bitcoin wallet I keep publicly online to taunt others:
date | md5sum
Glad to hear I’m not alone!