Skip to content

Instantly share code, notes, and snippets.

@onlytiancai
Last active December 14, 2015 22:29
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save onlytiancai/5158706 to your computer and use it in GitHub Desktop.
Save onlytiancai/5158706 to your computer and use it in GitHub Desktop.
你是什么类型的程序员。
history | awk '{CMD[$2]++;count++;} END { for (a in CMD )print CMD[a] " " CMD[a]/count*100 "% " a }' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10
# (陈皓注:有点复杂了,history|awk ‘{print $2}’|awk ‘BEGIN {FS=”|”} {print $1}’|sort|uniq -c|sort -rn|head -10)
# 这行脚本能输出你最常用的十条命令,由此甚至可以洞察你是一个什么类型的程序员。
@Garfield550
Copy link

坑爹吗?

@honker
Copy link

honker commented Mar 14, 2013

[16:26 X@dev:~/online/surl]$ history | head
1 [2013-01-15 10:38:55] ll
2 [2013-01-15 10:38:58] vi main.cpp
3 [2013-01-15 11:28:45] cd ..
4 [2013-01-15 11:28:46] ll
5 [2013-01-15 11:28:49] cd ade_fcgi/
6 [2013-01-15 11:28:49] ll
7 [2013-01-15 11:28:54] vi ade_main.cpp
8 [2013-01-15 11:52:07] vi ~/.vimrc
9 [2013-01-15 11:52:18] vi ade_main.cpp

10 [2013-01-15 17:02:59] ll

BUG.........

@laomo
Copy link

laomo commented Apr 12, 2013

发现使用最多的是自己写的脚本。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment