Bash 5 Adds New Shell Variables
Written by Kay Ewbank   
Friday, 11 January 2019

The fifth major version of Bash, the UNIX/Linux scripting shell has arrived. The new release has fixed a variety of bugs from the previous version, and has also added new features and improvements to better conform to POSIX specifications.

Bash is the GNU Project's Bourne Again SHell, a complete implementation of the POSIX shell spec. It also comes with interactive command line editing, job control on architectures that support it, csh-like features such as history substitution and brace expansion. 

gnuThe main changes to this release start with an improvement to the built-in 'wait' so that it can now wait for the last process.

There's a new EpochSeconds variable that can expand the time to show it in seconds from the Unix Epoch. The Unix epoch is the number of seconds that have elapsed since midnight UTC on January 1, 1970.A second new variable, EpochRealTime, can be used to show the number of seconds since the Unix Epoch, but in this case storing the seconds information as a floating point variable with microsecond granularity.

Three new loadable builtin commands have been added: rm, stat, fdflags. Because they are being added as loadables, it will be a choice for users as to whether or not to go with the builtin version rather than the existing versions, but where they are used it will reduce the number of binaries, and in the case of rm will mean that the shell can optimize globbing of the parameters. Another change to builtin commands is that the Bash history built-in can now remove ranges of history entries.

Other improvements include a new variable, Bash_Argvo, that expands to $0 and sets $0 on assignment; and the enabling by default of the globasciiranges option. This changes the behavior of character ranges used in pattern matching expressions. The new release also has a new shell option that can enable and disable sending history to syslog at runtime.

gnu

More Information

Announcement on Bash Git

Related Articles

Bash 4.4 Released

Google is 20, GNU is 35; Why No GNUgle?

GNU Manifesto Published Thirty Years Ago

Free Software Foundation Fun For Xmas

 

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Developers Wary Of The AI Tools They Use
24/07/2024

Over three quarters of developers use or plan to use AI tools, perceiving the main benefit as increasing productivity, but at the same time fewer than half trust the accuracy of AI tools and almost ha [ ... ]



BusyBeaver(5) Is 47,176,870
03/07/2024

The thing about the BusyBeaver function is that it is very easy to understand, but very difficult to compute. We now know its value up to 5, which isn't much progress for more than 50 years work.


More News

kotlin book

 

Comments




or email your comment to: comments@i-programmer.info