Bash 5.3 Shell Released

After almost three years of development, a new version of the GNU Bash 5.3 command interpreter, used by default in most distributions, has been published. LinuxAt the same time, the readline 8.3 library, used in bash for command line editing, was released.

Key improvements include:

  • New command substitution forms "${ command; }" and "${|command;}" are implemented, allowing to intercept the command output without forking a separate child process and without using unnamed pipes. The results of command execution are returned as the result of substitution or written to the REPLY variable.
  • A new variable GLOBSORT has been added, which defines the sorting method when appending a file path. For example, you can choose to sort by name (GLOBSORT=name), size (GLOBSORT=size), or modification time (GLOBSORT=mtime), and also define direct (from smaller to larger) or reverse (from larger to smaller) sorting order (for example, with "GLOBSORT=-size" the largest files will be shown first).
  • The built-in "compgen" command now has a "-V varname" option to save generated additions to a variable instead of outputting to standard output.
  • The "-E" option has been added to the "read" built-in command, which uses the readline library with bash construct autocompletion rules when entering data.
  • The "source" built-in command now has a "-p PATH" option that allows overriding the search list in file paths (the specified value is used instead of the $PATH variable).
  • The source code has been converted to use the C23 standard. The ability to build compilers in the "K&R C" mode (the style corresponding to the description of the C language in the book "The C Programming Language" by Kernighan and Ritchie) has been discontinued.
  • The built-in command "umask" is fully compliant with POSIX specifications.
  • Added a loadable command "kv" that generates an associative array based on a set of data in key-value format.
  • Added loadable command "strptime" which converts textual representation of date and time to epochal time (number of seconds since January 1, 1970).
  • Added a loadable command "fltexpr" that allows floating point arithmetic operations similar to the let command.
  • Added dynamically set variable BASH_MONOSECONDS, which contains the current value of the system monotonic clock, which continuously increases, even when the time changes to the past value.
  • In POSIX mode, string comparisons in the "test" command using the "<" and ">" operators are now performed taking into account the current locale.
  • The "bind -x" command allows a space to separate the key and the command to be invoked, as long as the sequence is enclosed in double quotes.
  • The new version of Readline offers a "search-ignore-case" option for case-insensitive search of the history. The "export-completions" command has been added to export word completions for processing in other processes. The "execute-named-command" command has been added to execute a command whose name is obtained from the standard input stream.

Source: opennet.ru

Buy reliable hosting for sites with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster