Bash 开发团队已发布 4.1 版本。Bash 是 Linux 系统中的标准Shell,该新版本为用户带来了下列新功能:
Here-documents within $(...) command substitutions may once more bedelimited by the closing right paren, instead of requiring a newline.
Bash's file status checks (executable, readable, etc.) now take filesystem ACLs into account on file systems that support them.
Bash now passes environment variables with names that are not validshell variable names through into the environment passed to childprocesses.
The `execute-unix-command' readline function now attempts to clear andreuse the current line rather than move to a new one after the commandexecutes.
`printf -v' can now assign values to array indices.
New `complete -E' and `compopt -E' options that work on the "empty"completion: completion attempted on an empty command line.
New complete/compgen/compopt -D option to define a `default' completion:a completion to be invoked on command for which no completion has beendefined. If this function returns 124, programmable completion isattempted again, allowing a user to dynamically build a set of completionsas completion is attempted by having the default completion functioninstall individual completion functions each time it is invoked.
When displaying associative arrays, subscripts are now quoted.
Changes to dabbrev-expand to make it more `emacs-like': no space appendedafter matches, completions are not sorted, and most recent history entriesare presented first.
The [[ and (( commands are now subject to the setting of `set -e' and theERR trap.
The source/. builtin now removes NUL bytes from the file before attemptingto parse commands.
There is a new configuration option (in config-top.h) that forces bash toforward all history entries to syslog.
A new variable $BASHOPTS to export shell options settable using `shopt' tochild processes.
There is a new confgure option that forces the extglob option to beenabled by default.
New variable $BASH_XTRACEFD; when set to an integer bash will write xtraceoutput to that file descriptor.
If the optional left-hand-side of a redirection is of the form {var}, theshell assigns the file descriptor used to $var or uses $var as the filedescriptor to move or close, depending on the redirection operator.
The < and > operators to the [[ conditional command now do stringcomparison according to the current locale if the compatibility levelis greater than 40.
Programmable completion now uses the completion for `b' instead of `a'when completion is attempted on a line like: a $(b c.
Force extglob on temporarily when parsing the pattern argument tothe == and != operators to the [[ command, for compatibility.
Changed the behavior of interrupting the wait builtin when a SIGCHLD isreceived and a trap on SIGCHLD is set to be Posix-mode only.
The read builtin has a new `-N nchars' option, which reads exactly NCHARScharacters, ignoring delimiters like newline.
The mapfile/readarray builtin no longer stores the commands it invokes viacallbacks in the history list.