This is an old revision of the document!


Bash versions support

The main bash version targeted is the 3.x line and generally won't work in older versions.

  • vcs version 1.0.11 included patches to run on bash 2.x but never really worked
  • vcs version 1.11 and 1.12 work on bash 2.05b and higher, 1.12.2 will be the last version capable of doing so, newer versions will require bash 3.1

Development notes

Syntax in 2.05b not used

References: http://wiki.bash-hackers.org/scripting/bashchanges

  • for ((;;)): C-style for. Loops in bash are *really* slow, an inline AWK loop, is much faster
  • [[ ... ]]: test replacement. Builtin with cleaner syntax and parsing, no need to quote, grouping (parentheses), && and || instead of -a and -o, arithmetic operators (e.g. -eq) force arithmetic evaluation (i.e. [[ 2 -eq "1+1" ]] is true):
    [ “$VAR” = “$X” -a 2 -eq $(( 1+1 )) ][[ $VAR = $X && 2 -eq '1+1' ]]

Syntax in 3.1

  • caller: caller 0 prints the calling function and line
All dates/times in this page are UTC.
  • vcs/docs/devel/bash_support.1282962204.txt.gz
  • Last modified: 2010/08/28 02:23
  • by Toni Corvera