bronze 1256660321 learn GNU Bash refernce manual is available here: http://tiswww.case.edu/php/chet/bash/bashref.html (bash maintainer home dirs), and here: http://www.gnu.org/software/bash/manual/bashref.html (GNU web site). The first one has a slightly nicer format. These are not man pages. bronze 1256660342 forget [arx] 1409667125 learn difference between $@ and $*: Without quotes (don't do this!), there is no difference. With double quotes, "$@" expands to each positional parameter as its own argument: "$1" "$2" ..., while "$*" expands to the single argument "$1c$2c...", where 'c' is the first character of IFS. You almost always want "$@" (QUOTED!). The same goes for arrays: "${array[@]}". [arx] 1409667147 forget ormaaj 1445262226 learn ''for var in words'' compound command iterates over arguments. ''for ((i=0; i < n; i++))'' iterates over a numeric range. To iterate over filenames, use ''for file in [glob]''. Do *NOT* do ''for foo in `cat,ls,find,...`'ere, for will iterate over resulting WORDS, NOT the "filenames", or "lines" that the command outputs. ormaaj 1445262256 forget geirha 1508579622 learn special option -- means "end of options" to every POSIX command except echo and test. E.g., mv -- *.png /somedir # see also http://wiki.bash-hackers.org/dict/terms/end_of_options geirha 1508579647 forget emanuele6 1679690779 learn difference between $@ and $*: "$@" (quoted) expands to each positional parameter as its own argument: "$1" "$2" ... while "$*" expands to the single argument "$1c$2c..." where c is the first character of IFS. You almost always want "$@". The same goes for arrays: "${array[@]}" or "${array[*]}". Unquoted $* and $@ are nonsense; DO NOT use emanuele6 1679690785 forget