Find out the Most used command

$ history | awk '{a[$'$(echo "1 2 $HISTTIMEFORMAT" | wc  -w)']++}END{for(i
in a){print a[i] " " i}}' | sort -rn | head

EX:

451 sudo
56 gammu
49 cd
33 python
27 gnokii
23 echo
19 ls
17 history
15 wtf
13 vim



-- 
Regards,
Tha.Suresh
http://thasulinux.wordpress.com
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to