5 ms·
This skips all the commands I pipe through, which excludes over half of the commands I use!
by jbesurs 13y ago
This skips all the commands I pipe through, which excludes over half of the commands I use!
- ctrl_freak 13y agoTry: history | sed 's/|/\n1 /' | awk '{print $2}' | sort | uniq -c | sort -rn | head -n 100 Of course this doesn't differentiate between quoted pipes and ones actually being used.
- claudius 13y agoThe ‘awk’ there effectively still drops everything after the second limiter, i.e. you won’t get a different result. Edit: history | sed -e 's/^ *[0-9]* //' -e 's/| */\n/' | awk '{print $1}' | sort | uniq -c | sort -rn | head -n 100 works for me.
- ctrl_freak 13y agoYeah I just realized that. Fixed.
- hackerpants 13y agoExcellent point. I'm definitely going to put that caveat at the beginning of any analysis I post. (and thanks to ctrl_freak for posting an alternative!)