SlideShare a Scribd company logo
1 of 64
Towards a Smarter Bash
HCI
Human
Computer
 
Barbara Blackburn
200 wpm = 200 * 5 * 8 / 60   = 133 bits/s
Towards a Smarter Bash
Howard Stephen Berg
25,000 wpm
he's a freak
2000 wpm = 1.3 kbits/s
Towards a Smarter Bash
V22.bis = Blazing Fast
For 1988
2:rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrsAXrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr 2rXXXXXXXXXXXXXXXXXXXXXXXXXXXXX5@; B2222XXXXXXXXXXXXX22XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXhi 2sXXXXXXXXXXXXXXXXXXXXXXXXXXX2h@@A,@@#A92XXXXXXXXXX2Xh22XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX3i 2rXX22222222222222222252222222S#@@@@@@922222222225ShX3@S2222222222222222222222X22222222222222222222222222XXi 2rX2222222222222222225HA522222Ss3B##A5:2X222222H&#MH  @522222222222222222S2##X2222222222222222222222222222Xi 2rX22222222222222222iBX,A2S5525Ssrrri;iX22222Xi5@@@@@@@@S222222222222225##@  #i522222222222222222222222222Xi 2rX2222222222222222XB@S G#Hh9525SSSSSr922222X2;i2#@@@@#2S222222222225525@@@si#3522222222222222222222222222Xi 2rX22222222222222225@@@@@@@Hh2222223ri3222223ri2isS22isS22222225555A#ASiG@@@@@#A52222222222222222222222222Xi 2rX2222222222222222SiH@@@@M;sX222223rXX2222X5r925Ssssi5222222223h2H  @iis2B##ASh52222222222222222222222222Xi 2rX22222222222222225issiiir;X22222X5r9222223rSX225SS2222222225AM@@@,5@M5isrs;:s522222222222222222222222222Xi 2rX222222222222222225Siii2rs322222Xsi3222222r3X25h#A355522222XrX@@@@@@#SS55r;XX222222222222222222222222222Xi 2rX2222222222222222222222Xr2X222223r5X22223si322i@; &hh322222Xr;2H#MA2i52Xrs9X2222222222222222222222222222Xi 2rX2222222222222222222222Xr32222223r2X22223rXX22#@#;M@@MA5222Xs;Srrrri523rs9X22222222222222222222222222222Xi 2rX222222222222222222222X5r9222222Xr32222XSr922i&@@@@@@A:2222XirXSSS5223sr9X222222222222222222222222222222Xi 2rX222222222222222222222Xir922222X2r322223riX222iSGHHG2s;X2223ssX22222X5r325222222222222222222222222222222Xi 2rX2222222222222222222223si322222X5r922223rXX225SisrrrSss32223siX22252S:hHMAS22222222222222222222222222222Xi 2rX2222222222222222222223si322222XSr9222X5r9222255SS553r5X2229r5X22XAAHh3 ;@i22222222222222222222222222222Xi 2rX2222222222222222222223riX22222XSr3222Xis92222222222Xr32222XrX22XsA@@@M5@@AS2222222222222222222222222222Xi 2rX2222222222222222222229riX22222XSr32223rSX222222222Xir9222X5r922X;iA@@@@@@XS2222222222222222222222222222Xi 2rX2222222222222222222223si322222X5r92223r2X2222222223r5X2223si3225;3:ihG95iS22222222222222222222222222222Xi 2rX2222222222222222222223is32222X32rh3X3Xr3X2222222222r322223r2X2XssX;SsrsiS2225X2222222222222222222222222Xi 2rX222222222222222222222Xir9X9GAA&Gs&hGA9SBA&h3XX2223si3222X5r9229r25r355522555&A#SS2222222222222222222222Xi 2rX222222222222222222222X5sH9i;.  .:r59&AG3X3rXX2223ri3222r&2rXX222292#, #&X5222222222222222222222Xi 2rX222222222222222222222h&:.  ,s9H2ihX222XrXX2XiiH. hX222##@@AA@@#i222222222222222222222Xi 2rX22222222222222222222&5  ;hHhX2Xis9223i5  &h22XiiM@@@@@#55222222222222222222222Xi 2rX2222222222222222222Gr  ,3H99;2X223;  :B322Xrri5GAh5sS2222222222X22222222222Xi 2rX222222222222222222Gr  ,  :H2s922XX  ;#9XXX;XSirrri52222222222253X222222222Xi 2rX2222222222222222235  ..  iA322&;  5HAH5XA32555222222222222X 53222222222Xi 2rX22222222222222222G  :  3GX2A  ,,.:r2A9X22XXXXX22222XX ;AX22222222Xi 2rX2222222222222222Gr  :  ,  AX93;  h&&G3XGAA9XXXXM: :HX22222222Xi 2rX2222222222222222&  .,  ,  XG9iM  H;  ;3AA&3:  :HX22222222Xi 2rX222222222222222X3  :  .,  SH5i#A  SA222222222Xi 2rX2222222222222223A5.  :  :  sMrX&M#r  .B9222222222Xi 2rX2222222222222223&##G;  .,  ,.  :  rAsh9GB#&5r:,,.  .H&X222222222Xi 2rX222222222222222X9A2:SA3r.  :;;.  .,  .,  .233X3GhsH@@@@@@,  ;,  r#AX2222222222Xi 2rX2222222222222222X3A5.  rXGXs:.  ;  .:  5M9X39;iH&&&AB@  H@@M2;.  ,;X##GX22222222222Xi 2rX22222222222222222X9A#G;  ;i3hhX5s;:,. .: .....,;,.  rAHXSr393X9AM, r@AAB#@@###@@#A3X222222222222Xi 2rX22222222222222222XX9GA##&s.  .,,,,..,..  .r  .... ;,  .;9iHAA&3s  ,#G339hGAAAAGh3X22222222222222Xi 2rX222222222222222222XXX9h&H###&S;.  :  ..;  ..  :,  :#GX222XXXXXXX22222222222222222Xi 2rX222222222222222222222XX39hGAH####AXs;;.  ,.  :, .  s#GX2222222222222222222222222222Xi 2rX222222222222222222222222XXX39hG&AB#@@##BG2i;:;  .  .  . .;H#GX22222222222222222222222222222Xi 2rXG9XX2X2S222222G9XX2X2S22222XGh333h3Xh&AHM#@@@##MAX5isr,,;:,...  ,:r3#@#&XX2X2S222222G9XX2X2S222222G9X2X3i 2iA;iH32S2ASi529&;iH32S2ASi529G;iH32S2H5S23AHrX#HA&B@MB##@@2H@@BAM@MB#MBA;SA32S2ASi52hG:SA32S2ASi52hh:SH325S 5.  s2&@@@h5i:  r2A@@@h5i:  r2A@@@h5s:  .s3H@@@A35;  ,2H#@@@HXi:  s2A@@@h5s:  sXA@@@h5s:  sXHH 3, ..:3@@@@@@@G: ..:3@@@@@@@G, ..:3@@@@@@@h, ..:3@@@@@@@G:..,:h@@@@@@@h, ..:9@@@@@@@h, ..:9@@@@@@@h, ..:9@@M @M#####MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBH
Other Criticisms?
Towards a Smarter Bash
 
The Truth about UNIX:  the user interface is horrid (1981)
Inconsistent Syntax & Usage Names do not map to Functionality Feedback only occurs on Error High Cognitive Load
He was absolutely correct
For 1981.
Bash 4.0
file.new file.delete file.properties directory.new directory.delete directory.properties ...
alias file.new=”touch” alias  file.delete=”rm” alias file.properties=”stat” alias directory.new=”mkdir” alias directory.delete=”rmdir” alias directory.properties=”stat” ...
Mnemonics = Bash Completion
Alert Only On Error He was wrong ;)
Written by Monkeys on Crack? Snopes says True.
 
 
A computer shall not harm your work or, through inactivity, allow your work to come to harm.
function rm() {   mv $* ${TMP_DIR}/. } set -C
A computer shall not waste your time or require you to do more work than is strictly necessary
Shannon's Law bits/s = frequency * log (1+S/N) N = our typing error rate
shopt -s dirspell  shopt -s cdspell set completion-ignore-case on
To get any lazier,  we need to do some real work
Huffman Coding Vary storage size inversely  with frequency
sort .bash_history |    awk '{ print $1 }' |    uniq -c | sort -rn | less Create tiny aliases  for the most common
me$ cd /var/tmp me$ ls
cd() {   builtin cd "$@"   # list first bunch of entries   directory.contents.wide | head  }
me$ chmod 0 lamers_file me$ ls -l lamers_file
[[ ${PS1} = “” ]] && return   file_change() {   IFS=   $@   shift   for f in "$*" ; do   if file.is_file "${f}"; then   file.properties "${f}"   fi   done }
mv()  { file_change  command mv  "$@"; } chmod() { file_change  command chmod "$@"; } chown() { file_change  command chown "$@"; } touch() { file_change  command touch "$@"; }
Smart Prompts know that attention is precious
Seeing is believing?
sane_prompt() {   export PROMPT_LAST_CMD_EXIT_CODE=$?    history -a    prompt_screen_shelltitle    local pkts=$( prompt_pad  ${TEXT_RED} prompt_network_loss )   # wifi, directory size   # SVN/CVS/GIT repo status   # disk usage, cpu usage, …   PS1="${hms}${box}${disk}${cpu}${wifi}${pkts}${dirsize}${repo}${err}${wd}"   [[ ${#PS1} -gt ${PROMPT_MAX_LENGTH} ]] &&  PS1="${PS1}"   export PS1="${PS1}${sigil}${TEXT_BLACK} "   export PROMPT_PREVIOUS_TIME=${SECONDS} } export PROMPT_COMMAND=sane_prompt
What about the Third Law?
sane_prompt() {   ...   # disabled by operator?   [[ -e ${PROMPT_KILL_FILE} ]] && return   # box too busy, be nice   local load=$( cpu_usage_as_int )   [[ ${load} -gt ${PROMPT_LOAD_MAX} ]] && {    echo CPU LOAD ABOVE ${PROMPT_LOAD_MAX}    return    }   ... }
2:rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrsAXrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr 2rXXXXXXXXXXXXXXXXXXXXXXXXXXXXX5@; B2222XXXXXXXXXXXXX22XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXhi 2sXXXXXXXXXXXXXXXXXXXXXXXXXXX2h@@A,@@#A92XXXXXXXXXX2Xh22XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX3i 2rXX22222222222222222252222222S#@@@@@@922222222225ShX3@S2222222222222222222222X22222222222222222222222222XXi 2rX2222222222222222225HA522222Ss3B##A5:2X222222H&#MH  @522222222222222222S2##X2222222222222222222222222222Xi 2rX22222222222222222iBX,A2S5525Ssrrri;iX22222Xi5@@@@@@@@S222222222222225##@  #i522222222222222222222222222Xi 2rX2222222222222222XB@S G#Hh9525SSSSSr922222X2;i2#@@@@#2S222222222225525@@@si#3522222222222222222222222222Xi 2rX22222222222222225@@@@@@@Hh2222223ri3222223ri2isS22isS22222225555A#ASiG@@@@@#A52222222222222222222222222Xi 2rX2222222222222222SiH@@@@M;sX222223rXX2222X5r925Ssssi5222222223h2H  @iis2B##ASh52222222222222222222222222Xi 2rX22222222222222225issiiir;X22222X5r9222223rSX225SS2222222225AM@@@,5@M5isrs;:s522222222222222222222222222Xi 2rX222222222222222225Siii2rs322222Xsi3222222r3X25h#A355522222XrX@@@@@@#SS55r;XX222222222222222222222222222Xi 2rX2222222222222222222222Xr2X222223r5X22223si322i@; &hh322222Xr;2H#MA2i52Xrs9X2222222222222222222222222222Xi 2rX2222222222222222222222Xr32222223r2X22223rXX22#@#;M@@MA5222Xs;Srrrri523rs9X22222222222222222222222222222Xi 2rX222222222222222222222X5r9222222Xr32222XSr922i&@@@@@@A:2222XirXSSS5223sr9X222222222222222222222222222222Xi 2rX222222222222222222222Xir922222X2r322223riX222iSGHHG2s;X2223ssX22222X5r325222222222222222222222222222222Xi 2rX2222222222222222222223si322222X5r922223rXX225SisrrrSss32223siX22252S:hHMAS22222222222222222222222222222Xi 2rX2222222222222222222223si322222XSr9222X5r9222255SS553r5X2229r5X22XAAHh3 ;@i22222222222222222222222222222Xi 2rX2222222222222222222223riX22222XSr3222Xis92222222222Xr32222XrX22XsA@@@M5@@AS2222222222222222222222222222Xi 2rX2222222222222222222229riX22222XSr32223rSX222222222Xir9222X5r922X;iA@@@@@@XS2222222222222222222222222222Xi 2rX2222222222222222222223si322222X5r92223r2X2222222223r5X2223si3225;3:ihG95iS22222222222222222222222222222Xi 2rX2222222222222222222223is32222X32rh3X3Xr3X2222222222r322223r2X2XssX;SsrsiS2225X2222222222222222222222222Xi 2rX222222222222222222222Xir9X9GAA&Gs&hGA9SBA&h3XX2223si3222X5r9229r25r355522555&A#SS2222222222222222222222Xi 2rX222222222222222222222X5sH9i;.  .:r59&AG3X3rXX2223ri3222r&2rXX222292#, #&X5222222222222222222222Xi 2rX222222222222222222222h&:.  ,s9H2ihX222XrXX2XiiH. hX222##@@AA@@#i222222222222222222222Xi 2rX22222222222222222222&5  ;hHhX2Xis9223i5  &h22XiiM@@@@@#55222222222222222222222Xi 2rX2222222222222222222Gr  ,3H99;2X223;  :B322Xrri5GAh5sS2222222222X22222222222Xi 2rX222222222222222222Gr  ,  :H2s922XX  ;#9XXX;XSirrri52222222222253X222222222Xi 2rX2222222222222222235  ..  iA322&;  5HAH5XA32555222222222222X 53222222222Xi 2rX22222222222222222G  :  3GX2A  ,,.:r2A9X22XXXXX22222XX ;AX22222222Xi 2rX2222222222222222Gr  :  ,  AX93;  h&&G3XGAA9XXXXM: :HX22222222Xi 2rX2222222222222222&  .,  ,  XG9iM  H;  ;3AA&3:  :HX22222222Xi 2rX222222222222222X3  :  .,  SH5i#A  SA222222222Xi 2rX2222222222222223A5.  :  :  sMrX&M#r  .B9222222222Xi 2rX2222222222222223&##G;  .,  ,.  :  rAsh9GB#&5r:,,.  .H&X222222222Xi 2rX222222222222222X9A2:SA3r.  :;;.  .,  .,  .233X3GhsH@@@@@@,  ;,  r#AX2222222222Xi 2rX2222222222222222X3A5.  rXGXs:.  ;  .:  5M9X39;iH&&&AB@  H@@M2;.  ,;X##GX22222222222Xi 2rX22222222222222222X9A#G;  ;i3hhX5s;:,. .: .....,;,.  rAHXSr393X9AM, r@AAB#@@###@@#A3X222222222222Xi 2rX22222222222222222XX9GA##&s.  .,,,,..,..  .r  .... ;,  .;9iHAA&3s  ,#G339hGAAAAGh3X22222222222222Xi 2rX222222222222222222XXX9h&H###&S;.  :  ..;  ..  :,  :#GX222XXXXXXX22222222222222222Xi 2rX222222222222222222222XX39hGAH####AXs;;.  ,.  :, .  s#GX2222222222222222222222222222Xi 2rX222222222222222222222222XXX39hG&AB#@@##BG2i;:;  .  .  . .;H#GX22222222222222222222222222222Xi 2rXG9XX2X2S222222G9XX2X2S22222XGh333h3Xh&AHM#@@@##MAX5isr,,;:,...  ,:r3#@#&XX2X2S222222G9XX2X2S222222G9X2X3i 2iA;iH32S2ASi529&;iH32S2ASi529G;iH32S2H5S23AHrX#HA&B@MB##@@2H@@BAM@MB#MBA;SA32S2ASi52hG:SA32S2ASi52hh:SH325S 5.  s2&@@@h5i:  r2A@@@h5i:  r2A@@@h5s:  .s3H@@@A35;  ,2H#@@@HXi:  s2A@@@h5s:  sXA@@@h5s:  sXHH 3, ..:3@@@@@@@G: ..:3@@@@@@@G, ..:3@@@@@@@h, ..:3@@@@@@@G:..,:h@@@@@@@h, ..:9@@@@@@@h, ..:9@@@@@@@h, ..:9@@M @M#####MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBH
Towards a Smarter Bash
 
 
echo 0.102.83.12.74.96 | sed 's// /g' |  each word printf '”%02x:”' {}
Any Ruby Fans Here?
each() {   ...   if [[ "$1" = "word" ]]; then   shift   while read line; do   for word in ${line}; do   eval "${@//amp;quot;${word}amp;quot;}"    done   done   fi }
Completion = Speed
export TWITS=”${HOME}/.twits” twit() {   url="https://twitter.com/statuses/update.xml"   __add() {    grep -q ^$1 ${TWITS} ||    echo $1 >> ${TWITS}   }   for word in $*; do   [[ '@' = "${word/[^@]*/}" ]] && __add ${word}   done   output=$(curl -v -n -d status="$*" ${url} 2>&1)   [[ $? != 0 ]] && echo ${output} } complete_twit() {   local cur=${COMP_WORDS[COMP_CWORD]}   COMPREPLY=( $( grep -i ${cur} ${TWITS} ) ) } complete -F complete_twit twit
Future Work
# bash 4.0 error trapping command_not_found_handle() {   local cmd="$*"   read -p "errors> "   -e   -i "${cmd}" cmd   ${cmd} }
Towards a Smarter Bash
Towards a Smarter Human
 
Thanks! http://haller.ws/projects/bash

More Related Content

What's hot

Writing Modular Command-line Apps with App::Cmd
Writing Modular Command-line Apps with App::CmdWriting Modular Command-line Apps with App::Cmd
Writing Modular Command-line Apps with App::CmdRicardo Signes
 
WordPress in 30 minutes
WordPress in 30 minutesWordPress in 30 minutes
WordPress in 30 minutesOwen Winkler
 
Capital onehadoopclass
Capital onehadoopclassCapital onehadoopclass
Capital onehadoopclassDoug Chang
 
SSH: Seguranca no Acesso Remoto
SSH: Seguranca no Acesso RemotoSSH: Seguranca no Acesso Remoto
SSH: Seguranca no Acesso RemotoTiago Cruz
 
Tibero sql execution plan guide en
Tibero sql execution plan guide enTibero sql execution plan guide en
Tibero sql execution plan guide enssusered8afe
 
Py conkr 20150829_docker-python
Py conkr 20150829_docker-pythonPy conkr 20150829_docker-python
Py conkr 20150829_docker-pythonEric Ahn
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeWim Godden
 
/Root/exam unidad1/muestraip red
/Root/exam unidad1/muestraip red/Root/exam unidad1/muestraip red
/Root/exam unidad1/muestraip redAntonioAlejoAquino
 
Http capturing
Http capturingHttp capturing
Http capturingEric Ahn
 
Rubish- A Quixotic Shell
Rubish- A Quixotic ShellRubish- A Quixotic Shell
Rubish- A Quixotic Shellguest3464d2
 
Representing Material Culture Online: Historic Clothing in Omeka
Representing Material Culture Online: Historic Clothing in OmekaRepresenting Material Culture Online: Historic Clothing in Omeka
Representing Material Culture Online: Historic Clothing in OmekaArden Kirkland
 
Vim Hacks (OSSF)
Vim Hacks (OSSF)Vim Hacks (OSSF)
Vim Hacks (OSSF)Lin Yo-An
 
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全維泰 蔡
 
Keep it simple web development stack
Keep it simple web development stackKeep it simple web development stack
Keep it simple web development stackEric Ahn
 

What's hot (20)

Writing Modular Command-line Apps with App::Cmd
Writing Modular Command-line Apps with App::CmdWriting Modular Command-line Apps with App::Cmd
Writing Modular Command-line Apps with App::Cmd
 
WordPress in 30 minutes
WordPress in 30 minutesWordPress in 30 minutes
WordPress in 30 minutes
 
Capital onehadoopclass
Capital onehadoopclassCapital onehadoopclass
Capital onehadoopclass
 
Bash tricks
Bash tricksBash tricks
Bash tricks
 
Gruntosoft windows
Gruntosoft windowsGruntosoft windows
Gruntosoft windows
 
SSH: Seguranca no Acesso Remoto
SSH: Seguranca no Acesso RemotoSSH: Seguranca no Acesso Remoto
SSH: Seguranca no Acesso Remoto
 
Tibero sql execution plan guide en
Tibero sql execution plan guide enTibero sql execution plan guide en
Tibero sql execution plan guide en
 
Tres Gemas De Ruby
Tres Gemas De RubyTres Gemas De Ruby
Tres Gemas De Ruby
 
Argon walkthru 1-26
Argon walkthru 1-26Argon walkthru 1-26
Argon walkthru 1-26
 
Py conkr 20150829_docker-python
Py conkr 20150829_docker-pythonPy conkr 20150829_docker-python
Py conkr 20150829_docker-python
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
/Root/exam unidad1/muestraip red
/Root/exam unidad1/muestraip red/Root/exam unidad1/muestraip red
/Root/exam unidad1/muestraip red
 
Http capturing
Http capturingHttp capturing
Http capturing
 
Rubish- A Quixotic Shell
Rubish- A Quixotic ShellRubish- A Quixotic Shell
Rubish- A Quixotic Shell
 
Representing Material Culture Online: Historic Clothing in Omeka
Representing Material Culture Online: Historic Clothing in OmekaRepresenting Material Culture Online: Historic Clothing in Omeka
Representing Material Culture Online: Historic Clothing in Omeka
 
Vim Hacks (OSSF)
Vim Hacks (OSSF)Vim Hacks (OSSF)
Vim Hacks (OSSF)
 
Elixir @ Paris.rb
Elixir @ Paris.rbElixir @ Paris.rb
Elixir @ Paris.rb
 
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
 
Keep it simple web development stack
Keep it simple web development stackKeep it simple web development stack
Keep it simple web development stack
 
GNU Parallel și GNU Stow
GNU Parallel și GNU StowGNU Parallel și GNU Stow
GNU Parallel și GNU Stow
 

Viewers also liked

Eco Philosophy 20-09-2007
Eco Philosophy 20-09-2007Eco Philosophy 20-09-2007
Eco Philosophy 20-09-2007Valerio Balbi
 
FreeLix: Semplicità & Controllo
FreeLix: Semplicità & ControlloFreeLix: Semplicità & Controllo
FreeLix: Semplicità & ControlloValerio Balbi
 
Bash in theory and in practice - part one
Bash in theory and in practice - part oneBash in theory and in practice - part one
Bash in theory and in practice - part oneValerio Balbi
 
Bash in theory and in practice - part two
Bash in theory and in practice - part twoBash in theory and in practice - part two
Bash in theory and in practice - part twoValerio Balbi
 

Viewers also liked (7)

pearls of Perl
pearls of Perlpearls of Perl
pearls of Perl
 
Eco Philosophy 20-09-2007
Eco Philosophy 20-09-2007Eco Philosophy 20-09-2007
Eco Philosophy 20-09-2007
 
FreeLix: Semplicità & Controllo
FreeLix: Semplicità & ControlloFreeLix: Semplicità & Controllo
FreeLix: Semplicità & Controllo
 
Bash 4
Bash 4Bash 4
Bash 4
 
Bash in theory and in practice - part one
Bash in theory and in practice - part oneBash in theory and in practice - part one
Bash in theory and in practice - part one
 
Bash in theory and in practice - part two
Bash in theory and in practice - part twoBash in theory and in practice - part two
Bash in theory and in practice - part two
 
bash
bashbash
bash
 

Similar to Bash Geekcamp

Bash Scripting Gabrovo
Bash Scripting GabrovoBash Scripting Gabrovo
Bash Scripting GabrovoMarian Marinov
 
11 Things About 11gr2
11 Things About 11gr211 Things About 11gr2
11 Things About 11gr2afa reg
 
Python And GIS - Beyond Modelbuilder And Pythonwin
Python And GIS - Beyond Modelbuilder And PythonwinPython And GIS - Beyond Modelbuilder And Pythonwin
Python And GIS - Beyond Modelbuilder And PythonwinChad Cooper
 
R57php 1231677414471772-2
R57php 1231677414471772-2R57php 1231677414471772-2
R57php 1231677414471772-2ady36
 
Itty bittypresentation lrug
Itty bittypresentation lrugItty bittypresentation lrug
Itty bittypresentation lrugTom Crinson
 
Itty bittypresentation lrug
Itty bittypresentation lrugItty bittypresentation lrug
Itty bittypresentation lrugSkills Matter
 
Ruby 程式語言簡介
Ruby 程式語言簡介Ruby 程式語言簡介
Ruby 程式語言簡介Wen-Tien Chang
 
Танки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_ЯндексеТанки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_ЯндексеYandex
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In PerlKang-min Liu
 
Dns server clients (actual program)
Dns server clients (actual program)Dns server clients (actual program)
Dns server clients (actual program)Youssef Dirani
 
Dns server clients (actual program)
Dns server clients (actual program)Dns server clients (actual program)
Dns server clients (actual program)Youssef Dirani
 
Rush, a shell that will yield to you
Rush, a shell that will yield to youRush, a shell that will yield to you
Rush, a shell that will yield to youguestdd9d06
 
Dealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter ScottDealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter ScottO'Reilly Media
 
Itsecteam shell
Itsecteam shellItsecteam shell
Itsecteam shellady36
 
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...Arc & Codementor
 
Exploiting Php With Php
Exploiting Php With PhpExploiting Php With Php
Exploiting Php With PhpJeremy Coates
 

Similar to Bash Geekcamp (20)

Bash Scripting Gabrovo
Bash Scripting GabrovoBash Scripting Gabrovo
Bash Scripting Gabrovo
 
11 Things About 11gr2
11 Things About 11gr211 Things About 11gr2
11 Things About 11gr2
 
Python And GIS - Beyond Modelbuilder And Pythonwin
Python And GIS - Beyond Modelbuilder And PythonwinPython And GIS - Beyond Modelbuilder And Pythonwin
Python And GIS - Beyond Modelbuilder And Pythonwin
 
Perl Presentation
Perl PresentationPerl Presentation
Perl Presentation
 
About Go
About GoAbout Go
About Go
 
R57php 1231677414471772-2
R57php 1231677414471772-2R57php 1231677414471772-2
R57php 1231677414471772-2
 
Itty bittypresentation lrug
Itty bittypresentation lrugItty bittypresentation lrug
Itty bittypresentation lrug
 
Itty bittypresentation lrug
Itty bittypresentation lrugItty bittypresentation lrug
Itty bittypresentation lrug
 
Ruby 程式語言簡介
Ruby 程式語言簡介Ruby 程式語言簡介
Ruby 程式語言簡介
 
Танки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_ЯндексеТанки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
 
Dns server clients (actual program)
Dns server clients (actual program)Dns server clients (actual program)
Dns server clients (actual program)
 
Dns server clients (actual program)
Dns server clients (actual program)Dns server clients (actual program)
Dns server clients (actual program)
 
Rush, a shell that will yield to you
Rush, a shell that will yield to youRush, a shell that will yield to you
Rush, a shell that will yield to you
 
Osol Pgsql
Osol PgsqlOsol Pgsql
Osol Pgsql
 
Dealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter ScottDealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter Scott
 
Itsecteam shell
Itsecteam shellItsecteam shell
Itsecteam shell
 
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
Codementor Office Hours with Eric Chiang: Stdin, Stdout: pup, Go, and life at...
 
Ruby 1.9
Ruby 1.9Ruby 1.9
Ruby 1.9
 
Exploiting Php With Php
Exploiting Php With PhpExploiting Php With Php
Exploiting Php With Php
 

Recently uploaded

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Recently uploaded (20)

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

Bash Geekcamp

  • 2. HCI
  • 5.  
  • 7. 200 wpm = 200 * 5 * 8 / 60 = 133 bits/s
  • 12. 2000 wpm = 1.3 kbits/s
  • 16. 2:rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrsAXrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr 2rXXXXXXXXXXXXXXXXXXXXXXXXXXXXX5@; B2222XXXXXXXXXXXXX22XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXhi 2sXXXXXXXXXXXXXXXXXXXXXXXXXXX2h@@A,@@#A92XXXXXXXXXX2Xh22XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX3i 2rXX22222222222222222252222222S#@@@@@@922222222225ShX3@S2222222222222222222222X22222222222222222222222222XXi 2rX2222222222222222225HA522222Ss3B##A5:2X222222H&#MH @522222222222222222S2##X2222222222222222222222222222Xi 2rX22222222222222222iBX,A2S5525Ssrrri;iX22222Xi5@@@@@@@@S222222222222225##@ #i522222222222222222222222222Xi 2rX2222222222222222XB@S G#Hh9525SSSSSr922222X2;i2#@@@@#2S222222222225525@@@si#3522222222222222222222222222Xi 2rX22222222222222225@@@@@@@Hh2222223ri3222223ri2isS22isS22222225555A#ASiG@@@@@#A52222222222222222222222222Xi 2rX2222222222222222SiH@@@@M;sX222223rXX2222X5r925Ssssi5222222223h2H @iis2B##ASh52222222222222222222222222Xi 2rX22222222222222225issiiir;X22222X5r9222223rSX225SS2222222225AM@@@,5@M5isrs;:s522222222222222222222222222Xi 2rX222222222222222225Siii2rs322222Xsi3222222r3X25h#A355522222XrX@@@@@@#SS55r;XX222222222222222222222222222Xi 2rX2222222222222222222222Xr2X222223r5X22223si322i@; &hh322222Xr;2H#MA2i52Xrs9X2222222222222222222222222222Xi 2rX2222222222222222222222Xr32222223r2X22223rXX22#@#;M@@MA5222Xs;Srrrri523rs9X22222222222222222222222222222Xi 2rX222222222222222222222X5r9222222Xr32222XSr922i&@@@@@@A:2222XirXSSS5223sr9X222222222222222222222222222222Xi 2rX222222222222222222222Xir922222X2r322223riX222iSGHHG2s;X2223ssX22222X5r325222222222222222222222222222222Xi 2rX2222222222222222222223si322222X5r922223rXX225SisrrrSss32223siX22252S:hHMAS22222222222222222222222222222Xi 2rX2222222222222222222223si322222XSr9222X5r9222255SS553r5X2229r5X22XAAHh3 ;@i22222222222222222222222222222Xi 2rX2222222222222222222223riX22222XSr3222Xis92222222222Xr32222XrX22XsA@@@M5@@AS2222222222222222222222222222Xi 2rX2222222222222222222229riX22222XSr32223rSX222222222Xir9222X5r922X;iA@@@@@@XS2222222222222222222222222222Xi 2rX2222222222222222222223si322222X5r92223r2X2222222223r5X2223si3225;3:ihG95iS22222222222222222222222222222Xi 2rX2222222222222222222223is32222X32rh3X3Xr3X2222222222r322223r2X2XssX;SsrsiS2225X2222222222222222222222222Xi 2rX222222222222222222222Xir9X9GAA&Gs&hGA9SBA&h3XX2223si3222X5r9229r25r355522555&A#SS2222222222222222222222Xi 2rX222222222222222222222X5sH9i;. .:r59&AG3X3rXX2223ri3222r&2rXX222292#, #&X5222222222222222222222Xi 2rX222222222222222222222h&:. ,s9H2ihX222XrXX2XiiH. hX222##@@AA@@#i222222222222222222222Xi 2rX22222222222222222222&5 ;hHhX2Xis9223i5 &h22XiiM@@@@@#55222222222222222222222Xi 2rX2222222222222222222Gr ,3H99;2X223; :B322Xrri5GAh5sS2222222222X22222222222Xi 2rX222222222222222222Gr , :H2s922XX ;#9XXX;XSirrri52222222222253X222222222Xi 2rX2222222222222222235 .. iA322&; 5HAH5XA32555222222222222X 53222222222Xi 2rX22222222222222222G : 3GX2A ,,.:r2A9X22XXXXX22222XX ;AX22222222Xi 2rX2222222222222222Gr : , AX93; h&&G3XGAA9XXXXM: :HX22222222Xi 2rX2222222222222222& ., , XG9iM H; ;3AA&3: :HX22222222Xi 2rX222222222222222X3 : ., SH5i#A SA222222222Xi 2rX2222222222222223A5. : : sMrX&M#r .B9222222222Xi 2rX2222222222222223&##G; ., ,. : rAsh9GB#&5r:,,. .H&X222222222Xi 2rX222222222222222X9A2:SA3r. :;;. ., ., .233X3GhsH@@@@@@, ;, r#AX2222222222Xi 2rX2222222222222222X3A5. rXGXs:. ; .: 5M9X39;iH&&&AB@ H@@M2;. ,;X##GX22222222222Xi 2rX22222222222222222X9A#G; ;i3hhX5s;:,. .: .....,;,. rAHXSr393X9AM, r@AAB#@@###@@#A3X222222222222Xi 2rX22222222222222222XX9GA##&s. .,,,,..,.. .r .... ;, .;9iHAA&3s ,#G339hGAAAAGh3X22222222222222Xi 2rX222222222222222222XXX9h&H###&S;. : ..; .. :, :#GX222XXXXXXX22222222222222222Xi 2rX222222222222222222222XX39hGAH####AXs;;. ,. :, . s#GX2222222222222222222222222222Xi 2rX222222222222222222222222XXX39hG&AB#@@##BG2i;:; . . . .;H#GX22222222222222222222222222222Xi 2rXG9XX2X2S222222G9XX2X2S22222XGh333h3Xh&AHM#@@@##MAX5isr,,;:,... ,:r3#@#&XX2X2S222222G9XX2X2S222222G9X2X3i 2iA;iH32S2ASi529&;iH32S2ASi529G;iH32S2H5S23AHrX#HA&B@MB##@@2H@@BAM@MB#MBA;SA32S2ASi52hG:SA32S2ASi52hh:SH325S 5. s2&@@@h5i: r2A@@@h5i: r2A@@@h5s: .s3H@@@A35; ,2H#@@@HXi: s2A@@@h5s: sXA@@@h5s: sXHH 3, ..:3@@@@@@@G: ..:3@@@@@@@G, ..:3@@@@@@@h, ..:3@@@@@@@G:..,:h@@@@@@@h, ..:9@@@@@@@h, ..:9@@@@@@@h, ..:9@@M @M#####MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBH
  • 19.  
  • 20. The Truth about UNIX: the user interface is horrid (1981)
  • 21. Inconsistent Syntax & Usage Names do not map to Functionality Feedback only occurs on Error High Cognitive Load
  • 22. He was absolutely correct
  • 25. file.new file.delete file.properties directory.new directory.delete directory.properties ...
  • 26. alias file.new=”touch” alias file.delete=”rm” alias file.properties=”stat” alias directory.new=”mkdir” alias directory.delete=”rmdir” alias directory.properties=”stat” ...
  • 27. Mnemonics = Bash Completion
  • 28. Alert Only On Error He was wrong ;)
  • 29. Written by Monkeys on Crack? Snopes says True.
  • 30.  
  • 31.  
  • 32. A computer shall not harm your work or, through inactivity, allow your work to come to harm.
  • 33. function rm() { mv $* ${TMP_DIR}/. } set -C
  • 34. A computer shall not waste your time or require you to do more work than is strictly necessary
  • 35. Shannon's Law bits/s = frequency * log (1+S/N) N = our typing error rate
  • 36. shopt -s dirspell shopt -s cdspell set completion-ignore-case on
  • 37. To get any lazier, we need to do some real work
  • 38. Huffman Coding Vary storage size inversely with frequency
  • 39. sort .bash_history | awk '{ print $1 }' | uniq -c | sort -rn | less Create tiny aliases for the most common
  • 40. me$ cd /var/tmp me$ ls
  • 41. cd() { builtin cd "$@" # list first bunch of entries directory.contents.wide | head }
  • 42. me$ chmod 0 lamers_file me$ ls -l lamers_file
  • 43. [[ ${PS1} = “” ]] && return file_change() { IFS= $@ shift for f in "$*" ; do if file.is_file "${f}"; then file.properties "${f}" fi done }
  • 44. mv() { file_change command mv "$@"; } chmod() { file_change command chmod "$@"; } chown() { file_change command chown "$@"; } touch() { file_change command touch "$@"; }
  • 45. Smart Prompts know that attention is precious
  • 47. sane_prompt() { export PROMPT_LAST_CMD_EXIT_CODE=$? history -a prompt_screen_shelltitle local pkts=$( prompt_pad ${TEXT_RED} prompt_network_loss ) # wifi, directory size # SVN/CVS/GIT repo status # disk usage, cpu usage, … PS1="${hms}${box}${disk}${cpu}${wifi}${pkts}${dirsize}${repo}${err}${wd}" [[ ${#PS1} -gt ${PROMPT_MAX_LENGTH} ]] && PS1="${PS1}" export PS1="${PS1}${sigil}${TEXT_BLACK} " export PROMPT_PREVIOUS_TIME=${SECONDS} } export PROMPT_COMMAND=sane_prompt
  • 48. What about the Third Law?
  • 49. sane_prompt() { ... # disabled by operator? [[ -e ${PROMPT_KILL_FILE} ]] && return # box too busy, be nice local load=$( cpu_usage_as_int ) [[ ${load} -gt ${PROMPT_LOAD_MAX} ]] && { echo CPU LOAD ABOVE ${PROMPT_LOAD_MAX} return } ... }
  • 50. 2:rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrsAXrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr 2rXXXXXXXXXXXXXXXXXXXXXXXXXXXXX5@; B2222XXXXXXXXXXXXX22XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXhi 2sXXXXXXXXXXXXXXXXXXXXXXXXXXX2h@@A,@@#A92XXXXXXXXXX2Xh22XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX3i 2rXX22222222222222222252222222S#@@@@@@922222222225ShX3@S2222222222222222222222X22222222222222222222222222XXi 2rX2222222222222222225HA522222Ss3B##A5:2X222222H&#MH @522222222222222222S2##X2222222222222222222222222222Xi 2rX22222222222222222iBX,A2S5525Ssrrri;iX22222Xi5@@@@@@@@S222222222222225##@ #i522222222222222222222222222Xi 2rX2222222222222222XB@S G#Hh9525SSSSSr922222X2;i2#@@@@#2S222222222225525@@@si#3522222222222222222222222222Xi 2rX22222222222222225@@@@@@@Hh2222223ri3222223ri2isS22isS22222225555A#ASiG@@@@@#A52222222222222222222222222Xi 2rX2222222222222222SiH@@@@M;sX222223rXX2222X5r925Ssssi5222222223h2H @iis2B##ASh52222222222222222222222222Xi 2rX22222222222222225issiiir;X22222X5r9222223rSX225SS2222222225AM@@@,5@M5isrs;:s522222222222222222222222222Xi 2rX222222222222222225Siii2rs322222Xsi3222222r3X25h#A355522222XrX@@@@@@#SS55r;XX222222222222222222222222222Xi 2rX2222222222222222222222Xr2X222223r5X22223si322i@; &hh322222Xr;2H#MA2i52Xrs9X2222222222222222222222222222Xi 2rX2222222222222222222222Xr32222223r2X22223rXX22#@#;M@@MA5222Xs;Srrrri523rs9X22222222222222222222222222222Xi 2rX222222222222222222222X5r9222222Xr32222XSr922i&@@@@@@A:2222XirXSSS5223sr9X222222222222222222222222222222Xi 2rX222222222222222222222Xir922222X2r322223riX222iSGHHG2s;X2223ssX22222X5r325222222222222222222222222222222Xi 2rX2222222222222222222223si322222X5r922223rXX225SisrrrSss32223siX22252S:hHMAS22222222222222222222222222222Xi 2rX2222222222222222222223si322222XSr9222X5r9222255SS553r5X2229r5X22XAAHh3 ;@i22222222222222222222222222222Xi 2rX2222222222222222222223riX22222XSr3222Xis92222222222Xr32222XrX22XsA@@@M5@@AS2222222222222222222222222222Xi 2rX2222222222222222222229riX22222XSr32223rSX222222222Xir9222X5r922X;iA@@@@@@XS2222222222222222222222222222Xi 2rX2222222222222222222223si322222X5r92223r2X2222222223r5X2223si3225;3:ihG95iS22222222222222222222222222222Xi 2rX2222222222222222222223is32222X32rh3X3Xr3X2222222222r322223r2X2XssX;SsrsiS2225X2222222222222222222222222Xi 2rX222222222222222222222Xir9X9GAA&Gs&hGA9SBA&h3XX2223si3222X5r9229r25r355522555&A#SS2222222222222222222222Xi 2rX222222222222222222222X5sH9i;. .:r59&AG3X3rXX2223ri3222r&2rXX222292#, #&X5222222222222222222222Xi 2rX222222222222222222222h&:. ,s9H2ihX222XrXX2XiiH. hX222##@@AA@@#i222222222222222222222Xi 2rX22222222222222222222&5 ;hHhX2Xis9223i5 &h22XiiM@@@@@#55222222222222222222222Xi 2rX2222222222222222222Gr ,3H99;2X223; :B322Xrri5GAh5sS2222222222X22222222222Xi 2rX222222222222222222Gr , :H2s922XX ;#9XXX;XSirrri52222222222253X222222222Xi 2rX2222222222222222235 .. iA322&; 5HAH5XA32555222222222222X 53222222222Xi 2rX22222222222222222G : 3GX2A ,,.:r2A9X22XXXXX22222XX ;AX22222222Xi 2rX2222222222222222Gr : , AX93; h&&G3XGAA9XXXXM: :HX22222222Xi 2rX2222222222222222& ., , XG9iM H; ;3AA&3: :HX22222222Xi 2rX222222222222222X3 : ., SH5i#A SA222222222Xi 2rX2222222222222223A5. : : sMrX&M#r .B9222222222Xi 2rX2222222222222223&##G; ., ,. : rAsh9GB#&5r:,,. .H&X222222222Xi 2rX222222222222222X9A2:SA3r. :;;. ., ., .233X3GhsH@@@@@@, ;, r#AX2222222222Xi 2rX2222222222222222X3A5. rXGXs:. ; .: 5M9X39;iH&&&AB@ H@@M2;. ,;X##GX22222222222Xi 2rX22222222222222222X9A#G; ;i3hhX5s;:,. .: .....,;,. rAHXSr393X9AM, r@AAB#@@###@@#A3X222222222222Xi 2rX22222222222222222XX9GA##&s. .,,,,..,.. .r .... ;, .;9iHAA&3s ,#G339hGAAAAGh3X22222222222222Xi 2rX222222222222222222XXX9h&H###&S;. : ..; .. :, :#GX222XXXXXXX22222222222222222Xi 2rX222222222222222222222XX39hGAH####AXs;;. ,. :, . s#GX2222222222222222222222222222Xi 2rX222222222222222222222222XXX39hG&AB#@@##BG2i;:; . . . .;H#GX22222222222222222222222222222Xi 2rXG9XX2X2S222222G9XX2X2S22222XGh333h3Xh&AHM#@@@##MAX5isr,,;:,... ,:r3#@#&XX2X2S222222G9XX2X2S222222G9X2X3i 2iA;iH32S2ASi529&;iH32S2ASi529G;iH32S2H5S23AHrX#HA&B@MB##@@2H@@BAM@MB#MBA;SA32S2ASi52hG:SA32S2ASi52hh:SH325S 5. s2&@@@h5i: r2A@@@h5i: r2A@@@h5s: .s3H@@@A35; ,2H#@@@HXi: s2A@@@h5s: sXA@@@h5s: sXHH 3, ..:3@@@@@@@G: ..:3@@@@@@@G, ..:3@@@@@@@h, ..:3@@@@@@@G:..,:h@@@@@@@h, ..:9@@@@@@@h, ..:9@@@@@@@h, ..:9@@M @M#####MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBBBBBM#######MBH
  • 52.  
  • 53.  
  • 54. echo 0.102.83.12.74.96 | sed 's// /g' | each word printf '”%02x:”' {}
  • 55. Any Ruby Fans Here?
  • 56. each() { ... if [[ "$1" = "word" ]]; then shift while read line; do for word in ${line}; do eval "${@//amp;quot;${word}amp;quot;}" done done fi }
  • 58. export TWITS=”${HOME}/.twits” twit() { url="https://twitter.com/statuses/update.xml" __add() { grep -q ^$1 ${TWITS} || echo $1 >> ${TWITS} } for word in $*; do [[ '@' = "${word/[^@]*/}" ]] && __add ${word} done output=$(curl -v -n -d status="$*" ${url} 2>&1) [[ $? != 0 ]] && echo ${output} } complete_twit() { local cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=( $( grep -i ${cur} ${TWITS} ) ) } complete -F complete_twit twit
  • 60. # bash 4.0 error trapping command_not_found_handle() { local cmd="$*" read -p "errors> " -e -i "${cmd}" cmd ${cmd} }
  • 63.