Ludo blog

en
Aug 2017
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

Bash tips

Bash is a script shell for unix terminals.

Optimisations

  • using ':' for 'true', because true is a software executable whereas ':' is an internal bash command. Very usefull for infinite loops.

example:

while true; do echo 'Hello'; sleep 1; done

become:

while :; do echo 'Hello'; sleep 1; done
Thanks:
  • Gwenn
by ludovic Bellier on Thu May 19 19:28:49 2005 (Viewed: 5588 / 2 comments )
  |   RSS  |   RSS2  |   Atom  |   Source  |   Edit

#.   gwenn on Fri May 20 01:02:49 2005
s/for/while/
#.   ludo on Thu May 26 00:03:01 2005
oups yes ...
Comments not allowed anymore on this post