linux

Most used commands in history

Most of the “most used commands” approaches does not consider pipes and other complexities. This approach considers pipes, process substitution by backticks or $() and multiple commands separated by ; Perl regular expression breaks up each line using | or <( or ; or ` or $( and picks the first word (excluding “do” in case of for loops) history | perl -F"\||<\(|;|\`|\\$\(" -alne 'foreach (@F) { print $1 if /\b((?

bash completion for scp

I have been looking for a solution for broken bash_completion for scp command. I was thinking my ssh was not configured correctly for password-less login. But I just found out that bash completion is broken for Ubuntu 9.10. If you are suffering from same symptom, please read this article for fix.