Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is bash scripting affected by the bash4 release?

Tags:

bash

shell

bash4

bash4 looks good on paper, and I think I'll build it and give it a test drive.

In the meantime...

Anyone who has done the same care to share their expierence?

It would be particularly interesting to hear of any issues with old bash code.

like image 572
martin clayton Avatar asked Jan 12 '10 01:01

martin clayton


1 Answers

The bash NEWS file, repro'd here with some summary, has some good info. Big new features include:

  • Associative arrays: name members in array using array[name], and access with ${array[name]}
  • The special ** glob pattern: match all files and "zero or more" directories
  • Co-processes: use the coproc keyword to spawn another process, then redirect its I/O to the currently existing shell (or another process, if you so desire)
  • Case-modifying expansions: match names without regard to character case
like image 186
Tim Avatar answered Oct 24 '22 16:10

Tim