Differences between revisions 39 and 97 (spanning 58 versions)
Revision 39 as of 2016-08-25 13:34:16
Size: 7553
Comment: bash had read -t0 before 4.0. What 4.0 added was floating point support for those like in zsh (also added in ksh93 in 2004 one year after zsh)
Revision 97 as of 2024-03-17 01:40:00
Size: 10500
Editor: larryv
Comment: changed "Copied/inspired from" to "Copied from / inspired by"
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
  * [[http://cnswww.cns.cwru.edu/~chet/bash/NEWS|NEWS]]: a file tersely listing the notable changes between the current and previous versions
  * [[http://cnswww.cns.cwru.edu/~chet/bash/CHANGES|CHANGES]]: a "complete" bash change history (back to 2.0 only)
  * [[http://cnswww.cns.cwru.edu/~chet/bash/COMPAT|COMPAT]]: compatibility issues between bash3 and previous versions
 * [[http://tiswww.case.edu/php/chet/bash/NEWS|NEWS]]: a file tersely listing the notable changes between the current and previous versions
 * [[http://tiswww.case.edu/php/chet/bash/CHANGES|CHANGES]]: a "complete" bash change history (back to 2.0 only)
 * [[http://tiswww.case.edu/php/chet/bash/COMPAT|COMPAT]]: compatibility issues between bash3 and previous versions
Line 9: Line 9:
A more extensive list than the one below can be found at http://wiki.bash-hackers.org/scripting/bashchanges A more extensive list than the one below can be found at https://web.archive.org/web/20230401195427/https://wiki.bash-hackers.org/scripting/bashchanges
Line 11: Line 11:
=== Notable changes in the upcoming bash version ===

||'''Feature'''||'''Added in version'''||'''Copied/inspired from'''||
||[[BashLoadableBuiltins|loadable builtin]] deployment infrastructure||4.4-beta||ksh93 (1993)||
||mapfile/readarray -d||4.4-alpha||native||
||--help for builtins||4.4-alpha||ksh93 (2001, possibly earlier)||
||${var@spec}||4.4-alpha||mksh (2012) for the syntax, zsh (1990s) for the feature||
||local -||4.4-alpha||zsh (set -o localoptions) (1995)||
||$! and wait for process substitutions||4.4-alpha||native||
=== Changes in the upcoming bash-5.3 release ===
||'''Feature''' ||'''Copied from / inspired by''' ||
|| ${ CMDS;} || ksh93 ||
|| ${|CMDS;} || mksh ||
|| GLOBSORT (variable) || zsh's o/O glob qualifiers ||
|| local BASH_REMATCH || ||
|| compgen -V ||native ||
|| read -E || ||
|| array_expand_once (shopt) || ||
|| printf %#Q %#q (${var@Q} quoting) || zsh's q, qq, qqq, qqqq, q+, q- parameter expansion flags ||
|| printf %l.*s %lc (character aware %s %c) || zsh's default for %s, ksh93's %Ls/%Lc ||
Line 22: Line 24:
||'''Feature''' ||'''Added in version''' ||'''Copied from / inspired by''' ||
|| READLINE_ARGUMENT (variable) || 5.2 (2022) || zsh's NUMERIC variable ||
|| varredir_close (shopt) || 5.2 (2022) || ||
|| printf %Q || 5.2 (2022) || ||
|| noexpand_translations (shopt) || 5.2 (2022) || ||
|| ${var@k} || 5.2 (2022) || zsh's ${(kv)var} ||
|| ${var/$pat/&}, patsub_replacement (shopt) || 5.2 (2022) || ksh93's \0, zsh's $MATCH ||
|| globskipdots (shopt) || 5.2 (2022) || ||
||BASH_REMATCH is no longer readonly || 5.1 (2020) || ||
||PROMPT_COMMAND may be an array || 5.1 (2020) || zsh's precmd_functions array ||
||SRANDOM (variable) || 5.1 (2020) || ||
||wait -p varname || 5.1 (2020) || ||
||declare -I || 5.1 (2020) || NetBSD sh (default behaviour in ash) ||
||${var@U}, ${var@u}, ${var@L}, ${var@K} || 5.1 (2020) || zsh's U, L, C, kv parameter expansion flags, zsh/tcsh's :u, :l modifiers ||
||BASH_ARGV0 (variable) || 5.0 (2019) || ||
||EPOCHSECONDS, EPOCHREALTIME (variables) ||5.0 (2019) ||zsh (2003, 2011) ||
||wait -f ||5.0 (2019) || ||
||history -d allows negative offsets ||5.0 (2019) || ||
||assoc_expand_once (shopt) ||5.0 (2019) || ||
||localvar_inherit (shopt) ||5.0 (2019) || ||
||--pretty-print (invocation option) ||5.0 (2019) ||native ||
||assoc=(key1 value1 key2 value2) assoc+=(key value) || 5.0 (2019) || ||
||PS0 (variable) ||4.4 (2016) ||native ||
||[[BashLoadableBuiltins|loadable builtin]] deployment infrastructure ||4.4 (2016) ||ksh93 (1993) ||
||mapfile/readarray -d ||4.4 (2016) ||native ||
||--help for builtins ||4.4 (2016) ||ksh93 (2001, possibly earlier) ||
||${var@a}, ${var@A}, ${var@E}, ${var@P}, ${var@Q}||4.4 (2016) ||mksh (2012) for the syntax, zsh (1990s) for the feature ||
||local - ||4.4 (2016) ||Almquist shell (1989) ||
||$! and wait for process substitutions ||4.4 (2016) ||native ||
||wait -n ||4.3 (2014) ||native ||
||test -R ||4.3 (2014) ||ksh93 (1993) ||
||test -v 'array[element]' (bug fix) ||4.3 (2014) ||ksh93 (1993) ||
||declare/typeset -n and associated changes to ${!ref} and for..in ||4.3 (2014) ||ksh93 (1993) ||
||array[-idx] (in assignments, read, unset, etc) ||4.3 (2014) ||zsh (1990s) ||
||printf %(fmt)T uses -1 as default argument instead of 0 ||4.3 (2011) ||ksh93 (1999) ||
||quotes in the replacement part of ${var/pat/"$rep"} are no longer literal ||4.3 (2011) || ||
||\uXXXX and \UXXXXXXXX ||4.2 (2011) ||zsh (2001) ||
||declare -g ||4.2 (2011) ||zsh (1990s) ||
||test -v ||4.2 (2011) ||ksh93 (2009) ||
||printf %(fmt)T ||4.2 (2011) ||ksh93 (1999) ||
||${array[-idx]} and ${var:start:-len} ||4.2 (2011) ||zsh (1990s) and native ||
||lastpipe (shopt) ||4.2 (2011) ||ksh (1980s) default behaviour there ||
||read -N ||4.1 (2010) ||ksh93 (2003) ||
||{var}> or {var}< etc. (FD variable assignment) ||4.1 (2010) ||developed jointly with ksh93 and zsh ||
||syslog history (compile option) ||4.1 (2010) ||native ||
||complete -D (allowing dynamically loaded completions) ||4.1 (2010)|| ||
||BASH_XTRACEFD (variable) ||4.1 (2010) ||native ||
||${@:offset[:length]} includes $0 ||4.0 (2009) ||ksh ||
||;& and ;;& fall-throughs for case ||4.0 (2009) ||ksh93 (1993) ||
||associative arrays ||4.0 (2009) ||ksh93 (1993) ||
||&>> and |& ||4.0 (2009) ||native and csh (1970s) ||
||command_not_found_handle (function) ||4.0 (2009) ||native ||
||compopt (builtin) || 4.0 (2009) || ||
||coproc (keyword) ||4.0 (2009) ||ksh (1980s), zsh (1990) for the coproc keyword ||
||globstar (shopt) ||4.0 (2009) ||zsh (1992), ksh93 (2005) for the name of the option ||
||mapfile/readarray (builtin) ||4.0 (2009) ||native ||
||${var,} ${var,,} ${var&#94;} ${var&#94;&#94;} ||4.0 (2009) ||native ||
||{009..012} (leading zeros in brace expansions) ||4.0 (2009) ||zsh (1995) ||
||{x..y..incr} ||4.0 (2009) ||ksh93 (2005) ||
||read -t 0 (test input availability) ||4.0 (2009) || ||
||read -t 0.5 ||4.0 (2009) ||zsh (2003) ||
||read -i ||4.0 (2009) ||zsh (vared) (1990s) ||
||x+=string array+=(string) ||3.1 (2005) ||ksh93 (2000) ||
||printf -v var ||3.1 (2005) ||native ||
||nocasematch (shopt) ||3.1 (2005) ||native ||
||{x..y} ||3.0 (2004) ||zsh (1995) ||
||${!array[@]} ||3.0 (2004) ||ksh93 (1993) ||
||[[ =~ ||3.0 (2004) ||native ||
||BASH_REMATCH ||3.0 (2004) ||native ||
||RETURN (trap) ||3.0 (2004) ||native ||
||pipefail (option) ||3.0 (2004) ||ksh93 ||
||failglob (shopt) ||3.0 (2004) ||native ||
||printf %q produces $'...' ||2.05b (2002) ||ksh93 (1993) ||
||[n]>&word- and [n]<&word- ||2.05b (2002) ||ksh93 ||
||<<< ||2.05b (2002) ||zsh (1991) ||
||printf %n ||2.05a (2001) ||ksh93 ||
||i++ ||2.04 (2000) ||ksh93 (1993) ||
||for ((;;)) ||2.04 (2000) ||ksh93 (1993) ||
||/dev/fd/N, /dev/tcp/host/port, etc. ||2.04 (2000) ||ksh93 (1993) ||
||read -t, -n, -d and -s ||2.04 (2000) ||ksh93 (1993) ||
||a=(*.txt) file expansion ||2.03 (1999) ||ksh93 (1993) ||
||extglob (shopt) ||2.02 (1998) ||ksh (1980s) ||
||[[ ||2.02 (1998) ||ksh (1980s) ||
||printf (builtin) ||2.02 (1998) ||ksh (1980s) ||
||$(< filename) ||2.02 (1998) ||ksh (1980s) ||
||** (exponentiation) ||2.02 (1998) ||zsh (1994) ||
||\xXX ||2.02 (1998) ||zsh (1994 or earlier) ||
||(( )) ||2.0 (1996) ||ksh (1980s) ||
||arrays ||2.0 (1996) ||csh (1979), zsh (1991) for array=(assignment) syntax ||
||$'...' (new quoting syntax) ||2.0 (1996) ||ksh93 (1993) ||
Line 23: Line 115:
||'''Feature'''||'''Added in version'''||'''Copied/inspired from'''||
||wait -n||4.3 (2014)||native||
||test -R||4.3 (2014)||ksh93 (1993)||
||declare/typeset -n and associated changes to ${!ref} and for..in||4.3 (2014)||ksh93 (1993)||
||array[-idx] (in assignments, read, unset, etc)||4.3 (2014)||zsh (1990s)||
||\uXXXX and \UXXXXXXXX||4.2 (2011)||zsh (2001)||
||declare -g||4.2 (2011)||zsh (1990s)||
||test -v||4.2 (2011)||ksh93 (2009)||
||printf %(fmt)T||4.2 (2011)||ksh93 (1999)||
||${array[-idx]} and ${var:start:-len}||4.2 (2011)||zsh (1990s) and native||
||lastpipe (shopt)||4.2 (2011)||ksh (1980s) default behaviour there||
||read -N||4.1 (2010)||ksh93 (2003)||
||{var}> or {var}< etc. (FD variable assignment)||4.1 (2010)||developed jointly with ksh93 and zsh||
||syslog history (compile option)||4.1 (2010)||native||
||BASH_XTRACEFD||4.1 (2010)||native||
||;& and ;;& fall-throughs for case||4.0 (2009)||ksh93 (1993)||
||associative arrays||4.0 (2009)||ksh93 (1993)||
||&>> and |&||4.0 (2009)||native and csh (1970s)||
||command_not_found_handle (function)||4.0 (2009)||native||
||coproc (keyword)||4.0 (2009)||ksh (1980s), zsh (1990) for the coproc keyword||
||globstar (shopt)||4.0 (2009)||zsh (1992), ksh93 (2005) for the name of the option||
||mapfile/readarray (builtin)||4.0 (2009)||native||
||${var,[,]} and ${var&#94;[&#94;]}||4.0 (2009)||native||
||{009..012} (leading zeros in brace expansions)||4.0 (2009)||zsh (1995)||
||{x..y..incr}||4.0 (2009)||ksh93 (2005)||
||read -t 0.5||4.0 (2009)||zsh (2003)||
||read -i||4.0 (2009)||zsh (vared) (1990s)||
||x+=string array+=(string)||3.1 (2005)|| ksh93 (2000) ||
||printf -v var||3.1 (2005)||native||
||nocasematch (shopt)||3.1 (2005)||native||
||{x..y}||3.0 (2004)||zsh (1995)||
||${!array[@]}||3.0 (2004)||ksh93 (1993)||
||[[ =~||3.0 (2004)||native||
||printf %q produces $'...'||2.05b (2002)||ksh93 (1993)||
||<<<||2.05b (2002)||zsh (1990s)||
||i++||2.04 (2000)||ksh93 (1993)||
||for ((;;))||2.04 (2000)||ksh93 (1993)||
||/dev/fd/N, /dev/tcp/host/port, etc.||2.04 (2000)||ksh93 (1990s)||
||read -t, -n, -d and -s||2.04 (2000)||ksh93 (1993)||
||a=(*.txt) file expansion||2.03 (1999)||ksh93 (1993)||
||extglob (shopt)||2.02 (1998)||ksh (1980s)||
||[[||2.02 (1998)||ksh (1980s)||
||printf (builtin)||2.02 (1998)||ksh (1980s)||
||$(< filename)||2.02 (1998)||ksh (1980s)||
||** (exponentiation)||2.02 (1998)||native||
||\xNNN||2.02 (1998)||zsh (1994 or earlier)||
||(( ))||2.0 (1996)||ksh (1980s)||
||arrays||2.0 (1996)||ksh (1980s)||
||$'...' (new quoting syntax)||2.0 (1996)||ksh93 (1993)||
Line 74: Line 117:

|| ```Release``` || ```Date``` ||
||<30%> Shellshock patches are released for bash-2.05b through bash-4.3 || 2014-09-24 to 2014-10-05       ||
|| bash-4.3      || [[http://lists.gnu.org/archive/html/bug-bash/2014-02/msg00081.html|2014-02-27]] ||
|| bash-4.2      || [[http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00134.html|2011-02-14]] ||
|| bash-4.1      || [[http://lists.gnu.org/archive/html/bug-bash/2010-01/msg00000.html|2010-01-02]] ||
|| bash-4.0      || [[http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00164.html|2009-02-23]] ||
|| bash-3.2      || [[http://lists.gnu.org/archive/html/bug-bash/2006-10/msg00057.html|2006-10-12]] ||
|| bash-3.1      || [[http://lists.gnu.org/archive/html/bug-bash/2005-12/msg00018.html|2005-12-09]] ||
|| bash-3.0      || [[http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00255.html|2004-07-27]] ||
|| bash-2.05b    || [[http://lists.gnu.org/archive/html/bug-bash/2002-07/msg00169.html|2002-07-17]] ||
|| bash-2.05a    || [[http://lists.gnu.org/archive/html/bug-bash/2001-11/msg00086.html|2001-11-15]] ||
|| bash-2.05     || [[http://lists.gnu.org/archive/html/bug-bash/2001-04/msg00047.html|2001-04-09]] ||
|| bash-2.04     || http://ftp.gnu.org/gnu/bash puts it around 2000-03-21 ||
|| bash-2.03     || [[https://groups.google.com/d/msg/gnu.bash.bug/3t0I8b4C848/PD66z8r966oJ|1999-02-19]] ||
|| bash-2.02 || [[https://groups.google.com/d/msg/gnu.bash.bug/wjK6DNyivbo/o_fzmlMXuh4J|1998-04-20]] ||
|| bash-2.01 || [[https://groups.google.com/d/msg/gnu.bash.bug/1YaFSUY31SI/QeaBAOzEfNUJ|1997-06-06]] ||
|| bash-2.0 || [[https://groups.google.com/d/msg/gnu.bash.bug/WE1Fa--vKw0/l9S7xZFP44AJ|1996-12-23]] ||
|| bash-1.14     || [[https://groups.google.com/d/msg/gnu.bash.bug/oOfJhX8Es74/H1fYjpvy9toJ|1994-06-02]] ||
|| bash-1.13     || [[https://groups.google.com/d/msg/gnu.bash.bug/KSGrYVYsxEE/ldpQw6UHd5wJ|1993-09-03]] ||
||<colspan="2"> Looks like Chet Ramey takes over as maintainer between 1.12 and 1.13 ||
|| bash-1.12 || [[https://groups.google.com/d/msg/gnu.bash.bug/LqJlezOLPmw/fWEU5dx63swJ|1992-01-26]] ||
|| bash-1.11 || [[https://groups.google.com/d/msg/gnu.bash.bug/mtiSajVLFWQ/IO7lRZZaXuEJ|1992-01-10]] ||
|| bash-1.10 || First mention found at [[https://groups.google.com/d/msg/gnu.bash.bug/2JCACpoweVo/VcbTlUED2L8J|1991-10-07]], so some time before that ||
|| bash-1.09 || First mention found at [[https://groups.google.com/d/msg/gnu.bash.bug/r2mPhpzeFA0/uEe2lEymOOAJ|1991-06-02]] ||
|| bash-1.08     || [[https://groups.google.com/d/msg/gnu.bash.bug/6IYJUqnlXbo/PtB74jsSdBEJ|1991-05-22]] ||
|| bash-1.07     || likely [[https://groups.google.com/d/msg/gnu.bash.bug/IbPT47bVNak/TgM9oOgwDOEJ|1991-02-01]] ||
|| bash-1.06     || This is a tough one. There was apparently a "bootleg" version of 1.06, so this requires more digging ||
|| bash-1.05     || [[https://groups.google.com/d/msg/gnu.bash.bug/sdSJj38zObM/9OJmiMwsEeYJ|1990-03-03]] ||
|| bash-1.04     || First mention found at [[https://groups.google.com/d/msg/gnu.bash.bug/OEAOMxIgXNM/_0MmMKhwBUoJ|1989-11-07]] ||
|| bash-1.03     || [[https://groups.google.com/d/msg/gnu.bash.bug/0BNtldi31-I/0z3R_gKQQ5AJ|1989-09-02]] ||
|| bash-1.02 || First mention found at [[https://groups.google.com/d/msg/gnu.bash.bug/n6oK8g9ZT_s/ZoiyAtJ0PmgJ|1989-07-09]] ||
|| bash-1.01 || [[https://groups.google.com/d/msg/gnu.bash.bug/cDuxRblQx4c/KsqoeeDF7KgJ|1989-06-23]] ||
|| bash-1.00 || Hard to search for ... ||
|| bash-0.99 || First mention found at [[https://groups.google.com/d/msg/gnu.bash.bug/dliLANZUdwI/X-lY_E-bDRMJ|1989-06-11]] ||
||'''Release''' ||'''Date''' ||
||bash-5.2 ||[[https://lists.gnu.org/archive/html/bug-bash/2022-09/msg00056.html|2022-09-26]] ||
||bash-5.1 ||[[https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00002.html|2020-12-07]] ||
||bash-5.0 ||[[http://lists.gnu.org/archive/html/bug-bash/2019-01/msg00063.html|2019-01-07]] ||
||bash-4.4 ||[[http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00018.html|2016-09-16]]
||
||<30%>Shellshock patches are released for bash-2.05b through bash-4.3 ||2014-09-24 to 2014-10-05 ||
||bash-4.3 ||[[http://lists.gnu.org/archive/html/bug-bash/2014-02/msg00081.html|2014-02-27]] ||
||bash-4.2 ||[[http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00134.html|2011-02-14]] ||
||bash-4.1 ||[[http://lists.gnu.org/archive/html/bug-bash/2010-01/msg00000.html|2010-01-02]] ||
||bash-4.0 ||[[http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00164.html|2009-02-23]] ||
||bash-3.2 ||[[http://lists.gnu.org/archive/html/bug-bash/2006-10/msg00057.html|2006-10-12]] ||
||bash-3.1 ||[[http://lists.gnu.org/archive/html/bug-bash/2005-12/msg00018.html|2005-12-09]] ||
||bash-3.0 ||[[http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00255.html|2004-07-27]] ||
||bash-2.05b ||[[http://lists.gnu.org/archive/html/bug-bash/2002-07/msg00169.html|2002-07-17]] ||
||bash-2.05a ||[[http://lists.gnu.org/archive/html/bug-bash/2001-11/msg00086.html|2001-11-15]] ||
||bash-2.05 ||[[http://lists.gnu.org/archive/html/bug-bash/2001-04/msg00047.html|2001-04-09]] ||
||bash-2.04 ||http://ftp.gnu.org/gnu/bash puts it around 2000-03-21 ||
||bash-2.03 ||[[https://groups.google.com/d/msg/gnu.bash.bug/3t0I8b4C848/PD66z8r966oJ|1999-02-19]] ||
||bash-2.02 ||[[https://groups.google.com/d/msg/gnu.bash.bug/wjK6DNyivbo/o_fzmlMXuh4J|1998-04-20]] ||
||bash-2.01 ||[[https://groups.google.com/d/msg/gnu.bash.bug/1YaFSUY31SI/QeaBAOzEfNUJ|1997-06-06]] ||
||bash-2.0 ||[[https://groups.google.com/d/msg/gnu.bash.bug/WE1Fa--vKw0/l9S7xZFP44AJ|1996-12-23]] ||
||bash-1.14 ||[[https://groups.google.com/d/msg/gnu.bash.bug/oOfJhX8Es74/H1fYjpvy9toJ|1994-06-02]] ||
||bash-1.13 ||[[https://groups.google.com/d/msg/gnu.bash.bug/KSGrYVYsxEE/ldpQw6UHd5wJ|1993-09-03]] ||
||||<style="text-align:center">Looks like Chet Ramey takes over as maintainer between 1.12 and 1.13 ||
||bash-1.12 ||[[https://groups.google.com/d/msg/gnu.bash.bug/LqJlezOLPmw/fWEU5dx63swJ|1992-01-26]] ||
||bash-1.11 ||[[https://groups.google.com/d/msg/gnu.bash.bug/mtiSajVLFWQ/IO7lRZZaXuEJ|1992-01-10]] ||
||bash-1.10 ||First mention found at [[https://groups.google.com/d/msg/gnu.bash.bug/2JCACpoweVo/VcbTlUED2L8J|1991-10-07]], so some time before that ||
||bash-1.09 ||First mention found at [[https://groups.google.com/d/msg/gnu.bash.bug/r2mPhpzeFA0/uEe2lEymOOAJ|1991-06-02]] ||
||bash-1.08 ||[[https://groups.google.com/d/msg/gnu.bash.bug/6IYJUqnlXbo/PtB74jsSdBEJ|1991-05-22]] ||
||bash-1.07 ||likely [[https://groups.google.com/d/msg/gnu.bash.bug/IbPT47bVNak/TgM9oOgwDOEJ|1991-02-01]] ||
||bash-1.06 ||This is a tough one. There was apparently a "bootleg" version of 1.06, so this requires more digging ||
||bash-1.05 ||[[https://groups.google.com/d/msg/gnu.bash.bug/sdSJj38zObM/9OJmiMwsEeYJ|1990-03-03]] ||
||bash-1.04 ||First mention found at [[https://groups.google.com/d/msg/gnu.bash.bug/OEAOMxIgXNM/_0MmMKhwBUoJ|1989-11-07]] ||
||bash-1.03 ||[[https://groups.google.com/d/msg/gnu.bash.bug/0BNtldi31-I/0z3R_gKQQ5AJ|1989-09-02]] ||
||bash-1.02 ||First mention found at [[https://groups.google.com/d/msg/gnu.bash.bug/n6oK8g9ZT_s/ZoiyAtJ0PmgJ|1989-07-09]] ||
||bash-1.01 ||[[https://groups.google.com/d/msg/gnu.bash.bug/cDuxRblQx4c/KsqoeeDF7KgJ|1989-06-23]] ||
||bash-1.00 ||Hard to search for ... ||
||bash-0.99 || First beta release [[https://groups.google.com/g/gnu.announce/c/hvhlR1Vn1P0/m/NYwp-4_0CaUJ|1989-06-7]] ||

Is there a list of which features were added to specific releases (versions) of Bash?

Here are some links to official Bash documentation:

  • NEWS: a file tersely listing the notable changes between the current and previous versions

  • CHANGES: a "complete" bash change history (back to 2.0 only)

  • COMPAT: compatibility issues between bash3 and previous versions

A more extensive list than the one below can be found at https://web.archive.org/web/20230401195427/https://wiki.bash-hackers.org/scripting/bashchanges

Changes in the upcoming bash-5.3 release

Feature

Copied from / inspired by

${ CMDS;}

ksh93

${|CMDS;}

mksh

GLOBSORT (variable)

zsh's o/O glob qualifiers

local BASH_REMATCH

compgen -V

native

read -E

array_expand_once (shopt)

printf %#Q %#q (${var@Q} quoting)

zsh's q, qq, qqq, qqqq, q+, q- parameter expansion flags

printf %l.*s %lc (character aware %s %c)

zsh's default for %s, ksh93's %Ls/%Lc

Notable changes in released bash versions

Feature

Added in version

Copied from / inspired by

READLINE_ARGUMENT (variable)

5.2 (2022)

zsh's NUMERIC variable

varredir_close (shopt)

5.2 (2022)

printf %Q

5.2 (2022)

noexpand_translations (shopt)

5.2 (2022)

${var@k}

5.2 (2022)

zsh's ${(kv)var}

${var/$pat/&}, patsub_replacement (shopt)

5.2 (2022)

ksh93's \0, zsh's $MATCH

globskipdots (shopt)

5.2 (2022)

BASH_REMATCH is no longer readonly

5.1 (2020)

PROMPT_COMMAND may be an array

5.1 (2020)

zsh's precmd_functions array

SRANDOM (variable)

5.1 (2020)

wait -p varname

5.1 (2020)

declare -I

5.1 (2020)

NetBSD sh (default behaviour in ash)

${var@U}, ${var@u}, ${var@L}, ${var@K}

5.1 (2020)

zsh's U, L, C, kv parameter expansion flags, zsh/tcsh's :u, :l modifiers

BASH_ARGV0 (variable)

5.0 (2019)

EPOCHSECONDS, EPOCHREALTIME (variables)

5.0 (2019)

zsh (2003, 2011)

wait -f

5.0 (2019)

history -d allows negative offsets

5.0 (2019)

assoc_expand_once (shopt)

5.0 (2019)

localvar_inherit (shopt)

5.0 (2019)

--pretty-print (invocation option)

5.0 (2019)

native

assoc=(key1 value1 key2 value2) assoc+=(key value)

5.0 (2019)

PS0 (variable)

4.4 (2016)

native

loadable builtin deployment infrastructure

4.4 (2016)

ksh93 (1993)

mapfile/readarray -d

4.4 (2016)

native

--help for builtins

4.4 (2016)

ksh93 (2001, possibly earlier)

${var@a}, ${var@A}, ${var@E}, ${var@P}, ${var@Q}

4.4 (2016)

mksh (2012) for the syntax, zsh (1990s) for the feature

local -

4.4 (2016)

Almquist shell (1989)

$! and wait for process substitutions

4.4 (2016)

native

wait -n

4.3 (2014)

native

test -R

4.3 (2014)

ksh93 (1993)

test -v 'array[element]' (bug fix)

4.3 (2014)

ksh93 (1993)

declare/typeset -n and associated changes to ${!ref} and for..in

4.3 (2014)

ksh93 (1993)

array[-idx] (in assignments, read, unset, etc)

4.3 (2014)

zsh (1990s)

printf %(fmt)T uses -1 as default argument instead of 0

4.3 (2011)

ksh93 (1999)

quotes in the replacement part of ${var/pat/"$rep"} are no longer literal

4.3 (2011)

\uXXXX and \UXXXXXXXX

4.2 (2011)

zsh (2001)

declare -g

4.2 (2011)

zsh (1990s)

test -v

4.2 (2011)

ksh93 (2009)

printf %(fmt)T

4.2 (2011)

ksh93 (1999)

${array[-idx]} and ${var:start:-len}

4.2 (2011)

zsh (1990s) and native

lastpipe (shopt)

4.2 (2011)

ksh (1980s) default behaviour there

read -N

4.1 (2010)

ksh93 (2003)

{var}> or {var}< etc. (FD variable assignment)

4.1 (2010)

developed jointly with ksh93 and zsh

syslog history (compile option)

4.1 (2010)

native

complete -D (allowing dynamically loaded completions)

4.1 (2010)

BASH_XTRACEFD (variable)

4.1 (2010)

native

${@:offset[:length]} includes $0

4.0 (2009)

ksh

;& and ;;& fall-throughs for case

4.0 (2009)

ksh93 (1993)

associative arrays

4.0 (2009)

ksh93 (1993)

&>> and |&

4.0 (2009)

native and csh (1970s)

command_not_found_handle (function)

4.0 (2009)

native

compopt (builtin)

4.0 (2009)

coproc (keyword)

4.0 (2009)

ksh (1980s), zsh (1990) for the coproc keyword

globstar (shopt)

4.0 (2009)

zsh (1992), ksh93 (2005) for the name of the option

mapfile/readarray (builtin)

4.0 (2009)

native

${var,} ${var,,} ${var^} ${var^^}

4.0 (2009)

native

{009..012} (leading zeros in brace expansions)

4.0 (2009)

zsh (1995)

{x..y..incr}

4.0 (2009)

ksh93 (2005)

read -t 0 (test input availability)

4.0 (2009)

read -t 0.5

4.0 (2009)

zsh (2003)

read -i

4.0 (2009)

zsh (vared) (1990s)

x+=string array+=(string)

3.1 (2005)

ksh93 (2000)

printf -v var

3.1 (2005)

native

nocasematch (shopt)

3.1 (2005)

native

{x..y}

3.0 (2004)

zsh (1995)

${!array[@]}

3.0 (2004)

ksh93 (1993)

[[ =~

3.0 (2004)

native

BASH_REMATCH

3.0 (2004)

native

RETURN (trap)

3.0 (2004)

native

pipefail (option)

3.0 (2004)

ksh93

failglob (shopt)

3.0 (2004)

native

printf %q produces $'...'

2.05b (2002)

ksh93 (1993)

[n]>&word- and [n]<&word-

2.05b (2002)

ksh93

<<<

2.05b (2002)

zsh (1991)

printf %n

2.05a (2001)

ksh93

i++

2.04 (2000)

ksh93 (1993)

for ((;;))

2.04 (2000)

ksh93 (1993)

/dev/fd/N, /dev/tcp/host/port, etc.

2.04 (2000)

ksh93 (1993)

read -t, -n, -d and -s

2.04 (2000)

ksh93 (1993)

a=(*.txt) file expansion

2.03 (1999)

ksh93 (1993)

extglob (shopt)

2.02 (1998)

ksh (1980s)

[[

2.02 (1998)

ksh (1980s)

printf (builtin)

2.02 (1998)

ksh (1980s)

$(< filename)

2.02 (1998)

ksh (1980s)

** (exponentiation)

2.02 (1998)

zsh (1994)

\xXX

2.02 (1998)

zsh (1994 or earlier)

(( ))

2.0 (1996)

ksh (1980s)

arrays

2.0 (1996)

csh (1979), zsh (1991) for array=(assignment) syntax

$'...' (new quoting syntax)

2.0 (1996)

ksh93 (1993)

List of bash releases and other notable events

Release

Date

bash-5.2

2022-09-26

bash-5.1

2020-12-07

bash-5.0

2019-01-07

bash-4.4

2016-09-16

Shellshock patches are released for bash-2.05b through bash-4.3

2014-09-24 to 2014-10-05

bash-4.3

2014-02-27

bash-4.2

2011-02-14

bash-4.1

2010-01-02

bash-4.0

2009-02-23

bash-3.2

2006-10-12

bash-3.1

2005-12-09

bash-3.0

2004-07-27

bash-2.05b

2002-07-17

bash-2.05a

2001-11-15

bash-2.05

2001-04-09

bash-2.04

http://ftp.gnu.org/gnu/bash puts it around 2000-03-21

bash-2.03

1999-02-19

bash-2.02

1998-04-20

bash-2.01

1997-06-06

bash-2.0

1996-12-23

bash-1.14

1994-06-02

bash-1.13

1993-09-03

Looks like Chet Ramey takes over as maintainer between 1.12 and 1.13

bash-1.12

1992-01-26

bash-1.11

1992-01-10

bash-1.10

First mention found at 1991-10-07, so some time before that

bash-1.09

First mention found at 1991-06-02

bash-1.08

1991-05-22

bash-1.07

likely 1991-02-01

bash-1.06

This is a tough one. There was apparently a "bootleg" version of 1.06, so this requires more digging

bash-1.05

1990-03-03

bash-1.04

First mention found at 1989-11-07

bash-1.03

1989-09-02

bash-1.02

First mention found at 1989-07-09

bash-1.01

1989-06-23

bash-1.00

Hard to search for ...

bash-0.99

First beta release 1989-06-7

BashFAQ/061 (last edited 2024-04-14 22:29:57 by emanuele6)