Bash Shell 5.3 Released with New Command Substitution

Bash Shell 5.3 is out now, adding new scripting features, bug fixes, and enhancements to completion, substitution, and Readline.

Almost three years after Bash 5.2, and following a year-long cycle of beta and release candidate builds, the most popular command-line shell and scripting language used in Unix-like operating systems has released version 5.3.

The headline feature is a pair of new substitution forms, ${ command; } and ${|command;}, that run in the current shell context rather than in a child process. That change means scripts can capture output (or let the command write to REPLY) without paying the usual fork-and-pipe overhead—handy for tight loops and embedded systems.

Another welcome addition is GLOBSORT, a shell variable that lets users dictate how pathname expansions are ordered—by name, size, various timestamps, or even unsorted—and whether the list is ascending or descending.

Power users who live in tab completion will appreciate compgen -V, which can stuff generated completions directly into a variable, and read -E, which now borrows Readline’s programmable completion when grabbing interactive input. Meanwhile, source -p PATH allows scripts to “dot in” companion files from an explicit search path instead of $PATH.

Under the hood, the codebase has been updated to ensure conformance with C23 (the latest revision of the C programming language standard). As a consequence, Bash will no longer build with K&R-era compilers—a footnote for most distributions but a signal that legacy toolchains need to move on.

Last but not least, Bash 5.3’s twin, Readline 8.3, was released the same day. The standalone library now offers case-insensitive searching (search-ignore-case), a callable execute-named-command, and an export-completions facility for feeding completion data to external programs.

For more information, see the announcement.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Leave a Reply

Your email address will not be published. Required fields are marked *