nunojob:~ dscape/08$ echo The Black Sheep

dscape@dscape:~$ history | awk '{print $2}' \
| sort | uniq -c | sort -rn | head
86 sudo
45 cd
27 ll
23 ./script/server
21 rm
17 ls
12 vim
7 startx
5 glxinfo
4 su

Comments on: "history | awk ‘{print $2}’ | sort | uniq -c | sort -rn | head" (3)

  1. apt-get? aptitude? :P

  2. Ulisses Costa said:

    history | awk ‘{print $2}’
    só está a ver o segundo parametro :S

    echo “1 sudo aptitude install …” | awk ‘{print $2}’
    vai dar “sudo”… :S era porreiro melhorar aí essa parte para mostrar o comando todo!

  3. Ulisses Costa said:

    Afinal já sei uma versão para dar os comandos todos:

    history | sutmapw ‘drop 1’ | sutmapl ‘reverse . tail10 . sort . uniq_c . sort’

    A explicação aqui

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: