The writing dilemma

It has been quite some time, I am reading about stuff but when I want to sit down and write … More

show cpu usage in percentage

$ top -bn2|awk -F, ‘/Cpu/{if (NR>4){print 100-gensub(/.([^ ]+).*/,”\\1″,”g”,$4)}}’ liked the command, from allcommands.org commandlinefu.com

a bash timer

$ alias timer=’export ts=$(date +%s);p=’\”$(date -u -d @”$(($(date +%s)-$ts))” +”%H.%M.%S”)’\”;watch -n 1 -t banner $p;eval “echo $p”‘