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."

24 of 459 comments (clear)

  1. This is excellent news by Anonymous Coward · · Score: 5, Funny

    Perhaps this year, Linux will be ready for the desktop.

    1. Re:This is excellent news by mrsteveman1 · · Score: 5, Funny

      No, but it'll be ready for the year of the commandline (comes right after year of the hippo).

    2. Re:This is excellent news by multisync · · Score: 5, Insightful

      Perhaps this year, Linux will be ready for the desktop.

      Linux has been ready for the desktop for years. It's just that certain users are not yet ready for Linux.

      --
      I don't care why you're posting AC
    3. Re:This is excellent news by morcego · · Score: 5, Insightful

      Linux has been ready for the desktop for years. It's just that certain users are not yet ready for Linux.

      You are too kind. In fact, most users are not ready to operate computers. At all.

      --
      morcego
    4. 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.
  2. Re:csh syntax mode? by ichthus · · Score: 5, Funny

    Already there. Just type 'csh' and bash will enter csh-compatibility mode. For scripting, just replace your #!/bin/bash with #!/bin/csh and away you go.

    --
    sig: sauer
  3. looks like it still loses history by Froze · · Score: 5, Insightful

    Don't get me wrong, I really like bash, but the treatment of history is abysmal. The default behavior is to lose history due to a race condition when multiple bash sessions that are concurrently open are closed in arbitrary order.

    IMNSHO, the default of any process should be to never lose data.

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

      are you looking for shopt -s histappend ?

    2. Re:looks like it still loses history by MikeBabcock · · Score: 5, Interesting

      Log in twice (A) and (B) as the same user, do something in session (A), then log out of (A).

      Now check 'history' as (B), obviously the first session's command isn't there.

      Open another session, (C) and check its history. It is just as you'd expect. Now type a simple command into session (B) and log out of it. What do you think the history is?

      Check history on (C) still logged-in. Log out of (C) and check history on a new login and you'll see that the history matches (C) inherited from (A), no record of (B) happening.

      --
      - Michael T. Babcock (Yes, I blog)
  4. patience by Anonymous Coward · · Score: 5, Funny

    i'll wait for 4.2

  5. Re:Linux by Anonymous Coward · · Score: 5, Funny

    Still gay.

    Don't bash it dude.

  6. 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.

    1. Re:Zsh has had these features for years by Hatta · · Score: 5, Funny

      Excellent post. I look forward to the ensuing flame war.

      --
      Give me Classic Slashdot or give me death!
  7. Screenshots? by dsginter · · Score: 5, Funny

    Does anyone have any screenshots? I always hate that when they post some great new upgrade without any screenshots.

    --
    More
    1. Re:Screenshots? by NonUniqueNickname · · Score: 5, Funny
      Here are a couple of screen shots. First one running as regular user. Second one running as root.

      $

      #

  8. Re:Circular what? by slim · · Score: 5, Insightful

    What do you think was used to compile GCC?

  9. Re:csh syntax mode? by Doug+Neal · · Score: 5, Funny

    This is great, but I find the csh syntax easier to use from the command line (however unsafe it is to use in scripts). Will they add a csh compatability mode to bash?

    ln -s /bin/false /bin/csh

    99% of the functionality of csh, without the bugs!

  10. Re:Circular what? by Hatta · · Score: 5, Funny

    Sup dawg, I heard you liked compiling, so I put a compiler in your compiler so you can compile while you compile.

    --
    Give me Classic Slashdot or give me death!
  11. Re:Circular what? by fulldecent · · Score: 5, Funny

    Your mom?

    --

    -- I was raised on the command line, bitch

  12. Re:Circular what? by SatiricComet · · Score: 5, Funny

    Visual Studio 2008?

  13. I hate [T]CSH by Khopesh · · Score: 5, Insightful

    One of my favorite bookmarks, Csh Programming is Considered Harmful, is very useful for shell scripting in Bourne, Csh, and Bash. Oh, and it's also a good reminder of why you should never write csh scripts.

    In my experience, the only [t]csh users out there are those who used it back in the day before there were other options, or those who are so embedded in the C/C++ world that they thought it a good idea to use a C/C++ -styled shell. That's fine, use that shell. DON'T write scripts in it though. It's annoying. (More annoying: ln -s /bin/csh /bin/sh ... this breaks TONS of things as /bin/sh must be posix-compliant. Csh doesn't even want (or try) to do that!)

    --
    Use my userscript to add story images to Slashdot. There's no going back.
  14. Re:something resembling homepage by Tweenk · · Score: 5, Funny

    Are you smoking something? This is a GNU project. The "web page" is actually a facade to appease the unenlightened. Here is a Web 1.0 concept mapping for you:

    news page -> "announce" mailing list
    wiki -> "user" mailing list, documentation
    developer forum -> "dev" mailing list
    release notes -> in the tarball!

    --
    Those who would give up liberty to obtain working drivers, deserve neither liberty nor working drivers.
  15. Yes!!! by commodoresloat · · Score: 5, Funny

    This is definitely the turning point; the Register just last week published an article indicating that the one thing stopping most users from migrating from Windows was the lack of support for the `**' special glob pattern.

  16. Re:Ant-style ** globbing by WhitefishMT · · Score: 5, Funny

    So they've finally perfected the Gnu-tron bomb!