开发者

How is bash scripting affected by the bash4 release?

开发者 https://www.devze.com 2022-12-15 22:23 出处:网络
bash4 looks good on paper, and I 开发者_高级运维think I\'ll build it and give it a test drive.

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.


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


There is a compatibility document that covers all versions of bash through to 4.1.

Tightening up of POSIX compliance is one area where differences with version 3.2 have arisen.

0

精彩评论

暂无评论...
验证码 换一张
取 消