Slashdot Mirror


BASH 4.0 Released

An anonymous reader writes "The widely used Bourne-Again Shell (BASH) version 4.0 is out. The new major release fixes several remaining bugs in the 3.x releases, and introduces a bunch of new features. The most notable new features are associative arrays, improvements to the programmable completion functionality, case-modifying word expansions, co-processes, support for the `**' special glob pattern, and additions to the shell syntax and redirections. The shell has been changed to be more rigorous about parsing commands inside command substitutions, fixing one piece of POSIX non-compliance. Most of us will probably wait for the distros to test the new version and upgrade gradually, but you always have the option of grabbing the source and compiling it yourself. Enjoy."

6 of 459 comments (clear)

  1. Zsh has had these features for years by urdak · · Score: 5, Informative

    I've been using Zsh (the Z shell) for years, because it had better completion, and a richer bourne-shell and ksh-based programming language including also associative arrays and the co-process.
    So it would appear that bash finally caught up. But zsh has continued to improve. I'll be sticking with zsh for now, until I see that bash really caught up.

  2. Re:So? by QuoteMstr · · Score: 4, Informative

    What the fuck are you talking about? In the real world, shell scripts are used all the time. Despite their failings relative to more complex languages like Python and Perl, shell scripts are very easy to generate from repeated manual invocations of command lines.

    In other words, to scratch an itch with a Python script requires writing your command over again. With a shell script, you can build on the commands you've already typed. Shell scripting is the original RAD, and remains very useful today.

  3. Re:looks like it still loses history by Osso · · Score: 5, Informative

    are you looking for shopt -s histappend ?

  4. Re:looks like it still loses history by Froze · · Score: 4, Informative

    This almost works. I have tried using an approach like this by building bash scripts and modifying history variables.

    One issue is that sessions that don't terminate cleanly (ssh loss, system reboot, etc.) leave a bunch of dirty history files that would need to reaped at the next start up of a bash.

    --
    -- The morphemes of your disquisition are ascertainable, but they have eschewed an ambit of transpicuous exposition.
  5. Re:looks like it still loses history by threephaseboy · · Score: 4, Informative

    I did exactly as you said, and at the new login I had the commands from A,B,C (in that order) in history.
    Here's what it looks like:

      996  echo AAA # A
      997  history|tail # checking history on B
      998  echo BBB # B
      999  history|tail # checking history on C
    1000  history|tail # checking history on C, again
    1001  history |tail # new login

    This is:
    GNU bash, version 3.2.33(1)-release (x86_64-redhat-linux-gnu)

    --
    .
  6. Re:This is excellent news by fireman+sam · · Score: 5, Informative

    This is a placeholder for my reply to your comment. The comment itself has been written on paper using a disposable BIC ballpoint pen. The paper has been posted to the slashdot editors with instructions to replace this placeholder with the comment that is contained on the paper.

    A note to moderators. The comment I have written on the paper is both insightful and informative as well as funny. It would be impossible to consider the comment I have written to be overrated (even if it were rated +100), a troll, or flamebait. So please rate this placeholder accordingly.

    Thank you.

    --
    it is only after a long journey that you know the strength of the horse.