SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

/Root/exam unidad1/muestraip red
/Root/exam unidad1/muestraip red/Root/exam unidad1/muestraip red
/Root/exam unidad1/muestraip red
AntonioAlejoAquino
 
Rubish- A Quixotic Shell
Rubish- A Quixotic ShellRubish- A Quixotic Shell
Rubish- A Quixotic Shell
guest3464d2
 
Vim Hacks (OSSF)
Vim Hacks (OSSF)Vim Hacks (OSSF)
Vim Hacks (OSSF)
Lin Yo-An
 

Tendances (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
 

En vedette (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
 

Similaire à Bash Geekcamp

Bash Scripting Gabrovo
Bash Scripting GabrovoBash Scripting Gabrovo
Bash Scripting Gabrovo
Marian Marinov
 
11 Things About 11gr2
11 Things About 11gr211 Things About 11gr2
11 Things About 11gr2
afa reg
 
R57php 1231677414471772-2
R57php 1231677414471772-2R57php 1231677414471772-2
R57php 1231677414471772-2
ady36
 
Itty bittypresentation lrug
Itty bittypresentation lrugItty bittypresentation lrug
Itty bittypresentation lrug
Skills Matter
 
Ruby 程式語言簡介
Ruby 程式語言簡介Ruby 程式語言簡介
Ruby 程式語言簡介
Wen-Tien Chang
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
Kang-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
 
Itsecteam shell
Itsecteam shellItsecteam shell
Itsecteam shell
ady36
 

Similaire à 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
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Dernier (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

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.