RSS feed [root] /unix /script /weblog




login:

password:

title search:




 


Fri Apr 01 11:29:26 HKT 2016

bash



How to use eval, hash, readonly, shift, getopts, set, unset, let and shopt - http://www.thegeekstuff.com/2010/08/bash-shell-builtin-commands

Sample bash completion

SSH_COMPLETE=( $(cut -f1 -d' ' ~/.ssh/known_hosts |\
tr ',' '\n' |\
sort -u |\
grep -e '[:alpha:]') )
complete -o default -W "${SSH_COMPLETE[*]}" ssh

http://kasparov.skife.org/blog/stuff/starting-a-meme.html

Check history statistic - brianm@binky:~$ history | awk {'print $2'} | sort | uniq -c | sort -k1 -rn | head
164 svn
52 cd
42 ssh
32 sudo
22 git
16 ls
16 for
14 echo
13 man
10 curl
brianm@binky:~$

http://bluebones.net/2008/04/history-meme/

easy way to do "[-h|--help][-n|--name ]" - http://binkley.blogspot.com/2016/03/bash-long-options.html


(google search) (amazon search)
second
download zip of files only