\t is not recognized, TAB is
This commit is contained in:
parent
8950d2dfd5
commit
a0e9cb9f0b
@ -62,5 +62,5 @@ function top_commands() {
|
|||||||
history 1 | cat | 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 -n50
|
history 1 | cat | 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 -n50
|
||||||
}
|
}
|
||||||
function top_commands_full() {
|
function top_commands_full() {
|
||||||
history 1 | cat | sed 's/^[0-9 \t]*//g' | awk '{CMD[$0]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "%\t" a; }' | sort -nr | nl | head -n50
|
history 1 | cat | sed 's/^[0-9 TAB]*//g' | awk '{CMD[$0]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "%\t" a; }' | sort -nr | nl | head -n50
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user