Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Bash 3.0 Released

Posted by michael on Thu Jul 29, 2004 10:23 AM
from the hallelujah-bash-is-risen dept.
qazwsx789 writes "The first public release of bash-3.0 is now available via ftp and from the usual GNU mirror sites. For the official release notes by the author, Chet Ramey, check his usenet post."
+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by Stevyn (691306) on Thursday July 29 2004, @10:24AM (#9831916)
    ...a GTK front end
  • Bash was my first shell and I used it exclusively for years. One day, I'd read enough about zsh to force myself to give it a try. Oh how I loved thee, bash, but I won't be going back.
    • by Anonymous Coward on Thursday July 29 2004, @10:34AM (#9832068)
      Will everyone stop with the Bash bashing, please?
    • by Nachtfalke (160) on Thursday July 29 2004, @12:30PM (#9833621) Homepage
      Up until recently, I also was a zsh user. But bash has one thing going for it, that zsh does not do: work with a UTF-8 locale.
      The zsh line editor get's totally confused if you type for example an umlaut and backspace over it.
      And since my native language uses umlauts, and I need a UTF-8 environment for work, I had to go back to bash. Unfortunately...
      • by opk (149665) on Thursday July 29 2004, @10:46AM (#9832230) Journal
        Globs are more powerful: **/*.c will recursively search for .c files: much quicker to type than find.
        You can match file types: e.g. *(@) will get you symlinks. *(U) gets files owned by you.

        Syntax for alternation is a lot easier. No @(this|that) or !(*.f). Instead, it is (this|that) and ^*.f

        Next point is completion. It includes a vast range of definitions so completion works well for lots of commands. The completion system handles completing parts of words so it better handles user@host completion. You get descriptions with completion match listings. Completion also has a really powerful context sensitive configuration system so you can make it work the way you like.

        It has modules. For running a simple shell script it will actually use less space than bash because it doesn't need to load the line editor and other interactive related code into memory.

        There is much much more. It takes a while to learn everything but if you just enable the completion functions (autoload -U compinit; compinit) you'll find it better than bash or tcsh from day 1.
      • Bigs ones for me:
        • A sane auto-completion system. That is, "cvs <tab>" gives a list of all of the commands that cvs understands. "cvs -<tab>" (same as above but tabbing after typing "-") gives a list of all of the options that cvs understands. These are good things. Now, in fairness, bash also has a command completion library. Unfortunately, it's implemented as a huge set of Bash functions. In zsh, "set|wc" returns 179 lines. In bash, "set|wc" returns 3,961 lines. The net effect is that zsh's system is noticeably faster and less polluting to the local environment.
        • Modules. Wrappers for TCP connections, a built-in cron thingy, and PCRE are all loadable modules to do tricky things easily.
        • Lots of pre-defined things. Load the "colors" and "zsh/terminfo" modules and you get defined associative arrays like $fg, which emits terminal-appropriate escape codes to set the foreground color of printed text. The command "echo ${fg[red]}red text${fg[default]}normal text" prints "red text" in red, and "normal text" in your default color.

        Bash is a good shell, and I have nothing bad to say about it. However, zsh seems to have been designed from the ground up by power users and for power users. I absolutely love it and everyone that I've given a example config file to (to get them running with little hassle) has permanently switched.

          • As the maintainer of FreeBSD's bash-completion [freshports.org] port, I'm reasonably familiar with it. Yes, it's approximately as powerful as zsh's completion module. Still, have you ever looked at it? It's a giant set of defined functions and glue. Seriously, get to a bash prompt and type "set" to see all of the things that've been stuffed into your shell's namespace. Now, try that with zsh and be pleasantly surprised.

            As I said in another post, a big side effect is that zsh's completions seem to be much faster than bash's. That alone is worth the price of admission for me.

  • A new version? (Score:5, Interesting)

    by moonbender (547943) <moonbender@@@gmail...com> on Thursday July 29 2004, @10:26AM (#9831938)
    Hell, I didn't even know bash was still in active development. It was always just bash to me, not bash-x.y.z. But then I guess I wouldn't notice the difference, really.
    • Dear Apple haters... (Score:5, Informative)

      by TheHonestTruth (759975) on Thursday July 29 2004, @10:31AM (#9832033) Journal
      From the release notes:

      Several bug fixes for POSIX compliance came in from Apple; their assistance is appreciated.

      It looks like Apple is giving back to the community, and to a fundamental tool.

      To the parent: I'm in the same boat. I thought bash 3?? What is there to add?? Looks like multibyte char support (sorry, I'm are a dum Amer'kin).

      -truth

      • by Jahf (21968) on Thursday July 29 2004, @10:58AM (#9832361) Journal
        Believe it or not, -most- of the large companies that use GPL'ed tools give back to the community.

        Apple has done numerous fixes, not just on BASH.

        Sun (disclaimer: for whom I work) has done -tons- of work on GNOME, Mozilla and don't forget Open Office (just to name a few).

        IBM works on many projects and gives back ... plus contributing all new things like JFS.

        All the distro makers like Red Hat, Novell, etc give back tons.

        Each of those companies pay engineers to fix pieces not done in Open Source projects as well as to extend them for their customers. The patches are covered under GPL just like the main code, and these companies know it and yet knowingly dedicate serious money and hours to these projects. And then they satisfy the GPL by putting them out on source CDs or submitting them back to the main projects.

        The big problem for getting submitted code accepted is that these companies are usually fixing and developing on a codebase that is aging. For instance, Sun did numerous I18N fixes for GNOME 2.6, but by the time they were ready the main GNOME organization had moved on to 2.8. That means there is a disconnect between the two and the changes have to be ported forward before they will hit the main code branch. The same problem can happen with kernel patches and just about any other codebase that changes versions so quickly.

        Sorry, you were doing the good thing and pointing out Apple's contributions. But so many people think these companies violate the GPL (in spirit if not in law) when they are very large contributors to open source. Sure, some do, and the community usually find out about it and shame them into minimal compliance (Linksys and Sveasoft come to mind after my delving into alternate WRT54G firmwares last night), but generally speaking the big companies have been a good part of the community.
  • by meringuoid (568297) on Thursday July 29 2004, @10:27AM (#9831949)
    System-specific changes for: SCO Unix 3.2

    What are these, I wonder? Something along the lines of changing the prompt to always display [litigious@bastards]$, perhaps?

  • Neat (Score:5, Interesting)

    by stratjakt (596332) on Thursday July 29 2004, @10:27AM (#9831954) Journal
    Someone tell me why I want this. The Usenet post doesn't seem to explain what's so exciting about it, besides a bunch of boring bug-fixes, and some esoteric-sounding syntax changes.
    • Re:Neat (Score:5, Funny)

      by DAldredge (2353) <SlashdotEmail@GMail.Com> on Thursday July 29 2004, @10:31AM (#9832035) Journal
      Don't worry about it. Just let the adults keep using their computers and you can keep using your as a toy.

      (It's a shell, it's not susposed to be exciting)

    • Re:Neat (Score:5, Informative)

      by Brad Moore (11260) on Thursday July 29 2004, @10:36AM (#9832088) Homepage
      According to the changelog, all the messages are internationalized now, so if you spoke a language other than English, you can get error messages and such in your native language.
      • Re:Neat (Score:5, Funny)

        by KodaK (5477) <.sakodak. .at. .gmail.com.> on Thursday July 29 2004, @10:50AM (#9832277) Homepage
        you can get error messages and such in your native language.

        This is so going to suck. If I get an error message that I'm unfamiliar with I'll plug it into google. Even if the hit is in a language I don't understand I can usually work out what a solution to my problem may be by looking at the command sequences posted in replies.

        Now I'll lose that ability just because a bunch of whiners (the rest of the world) want error messages in *their* language. That's just not fair, as it doesn't benefit me.

        I propose an immediate reversal of the i18n changes introduced into Bash 3.0. Who's with my jingoistic ass?

    • Re:Neat (Score:4, Funny)

      by pete-classic (75983) <hutnick@gmail.com> on Thursday July 29 2004, @10:36AM (#9832091) Homepage Journal
      It supports a new sequence brace expansion which should make snarfing porn easier and more efficent.

      Does it get more exciting then that?

      -Peter
      • Re:Neat (Score:5, Funny)

        by cant_get_a_good_nick (172131) on Thursday July 29 2004, @11:27AM (#9832714)
        Cool, but just saves a process. Could do this with seq before.
        seq 1 30 | xargs -i wget http://pr0nsite.com/image{}.jpg
        Not that I'd try this or anything... no...

        I do want to get a T-Shirt made:
        Real geeks download their pr0n with one line shell-scripts.
  • Not much changed (Score:5, Insightful)

    by opk (149665) on Thursday July 29 2004, @10:28AM (#9831965) Journal
    Doesn't seem to be much changed given the version number increase. [[ =~ ]] can match regexes and it can do zsh style {1..3} expansions. Improved multibyte support too. There were bigger changes in some of the 2.0x updates.
  • Apple helping out (Score:5, Interesting)

    by Macka (9388) on Thursday July 29 2004, @10:30AM (#9832019)

    Several bug fixes for POSIX compliance came in from Apple; their assistance is appreciated.

    It's nice to see yet more contributions from Apple to the OSS community.
    • by hot_Karls_bad_cavern (759797) on Thursday July 29 2004, @10:43AM (#9832194) Journal
      "It's nice to see yet more contributions from Apple to the OSS community."

      Right on, brother. (This is not bashing apple before i get started!) They have done something that no one else in the *nix world has done: shit-hot gui. People can blather about this and that, but to deny that Apple has created one of the most user-friendly, beautiful, slick gui's for *nix is crazy. I'd like to continue seeing Apple release more help to OSS. Keep the real money makers to themselves (for now), but allow more dev's to release usefull changes back to the community that helped build it ya know?

      You are 100% correct that it's nice to see them making another move like this...even if it was a lil' one :)
  • by Bistronaut (267467) on Thursday July 29 2004, @10:33AM (#9832055) Homepage Journal
    They should have called the movie Bourne Again [imdb.com].
  • by FreemanPatrickHenry (317847) on Thursday July 29 2004, @10:33AM (#9832058)
    The Bourne Again and Again and Again Shell! Again!
  • by g_adams27 (581237) on Thursday July 29 2004, @10:37AM (#9832107)

    Yeah, Bash 3.0 is great and all, but when are the bash people going to upgrade rbash? Man, I can't do anything with that shell!
  • by Ashe Tyrael (697937) <ashe@nOsPAm.techromantic.co.uk> on Thursday July 29 2004, @10:42AM (#9832179)
    There's been an interesting little problem caused for people like Gentoo with the updates in bash 3.0.

    http://bugs.gentoo.org/show_bug.cgi?id=58703 [gentoo.org]

    Just a simple move towards compliance breaks most of their scripts, so they've had to patch it out.

    Lovely.
  • MSH (Score:4, Funny)

    by Jugalator (259273) on Thursday July 29 2004, @10:42AM (#9832181) Journal
    Ha ha, you dorks, use MSH [wikipedia.org] like a man!

    I wonder how this will get modded? :-o
  • POSIX (Score:5, Funny)

    by Waffle Iron (339739) on Thursday July 29 2004, @10:45AM (#9832211)
    This statement had me a little confused for a while:

    Several bug fixes for POSIX compliance came in from Apple; their assistance is appreciated.

    Then I looked through the POSIX spec, and sure enough I found this section, which explained things:

    POSIX section 23.4.18 (SHELL):

    To the extent possible on the terminal hardware, the shell
    shall present to the user the appearance mimicing a translucent plastic material. The shell rendering material model should incorporate prominent specular highlights suggesting a shiny smooth surface. The shell should cast fuzzy shadows on any user interface elements that lay below it.
  • Just wondering... (Score:4, Interesting)

    by Kynde (324134) <tkyntola AT cc DOT hut DOT fi> on Thursday July 29 2004, @10:48AM (#9832248) Homepage

    What is so hot about bash, e.g. compared to zsh?

    Seriously, I'm not trying to start a flame war here. This is coming from a really long term zsh user because back when I was just starting unix and linux a fellow bearded unix guru told me something along the lines "go with zsh, it's the best" (thas was about -95). And I've never looked back, but now seing bash being the default shell in most distros I've began to wonder what's going on. Perhaps over the years bash overtook zsh or there are some hidden qualities in bash that I don't know about.

    Anyone with some insight on _both_ shells would be greatly appreciated.
    • Re:Just wondering... (Score:5, Informative)

      by opk (149665) on Thursday July 29 2004, @11:05AM (#9832448) Journal
      Zsh is still the best.

      Bash developers have different priorities.
      Bash became the default primarily because it is GNU.
      Zsh has some ugly but powerful features like nested expansions. The two areas where bash is better than zsh is multibyte support and POSIX compliance. Much of that was contributed by IBM and Apple respectively. But if you use the shell a lot, you'll find zsh does a lot of things better. The completion is amazing. And when it isn't emulating sh/posix, it fixes some of the broken design decisions (like word splitting of variables) which saves you from doing stupid things.

      The FSF actually does development in a very closed manner when it can (the gcc egcs split was partly because of this). Bash is a good example of this. That perhaps a good thing because it is probably good that bash doesn't get some of zsh's nasty (but powerful) features. And if zsh didn't exist, bash might have been forked by now. If you care about your shell, you'll find much more of a community on the zsh lists than the spam filled bug-bash list. You can't even get at alpha releases of bash without being one of the chosen few.
  • Breaks Gentoo (Score:4, Informative)

    by Kujah (630784) on Thursday July 29 2004, @10:48AM (#9832254) Homepage
    Gentoo's various scripts rely on the fact that /bin/sh is usually symlinked to /bin/bash. With 3.0, when invoked as /bin/sh, bash behaves as it should for the first time, which caused some problems. (which are now fixed, by the way)
  • History timestamps! (Score:5, Informative)

    by straponego (521991) on Thursday July 29 2004, @10:58AM (#9832359)
    Bash can now store timestamps in the history and save them to the history file. This alone is worth the upgrade for me. The option to erase duplicates is pretty nice too.
  • by Anonymous Coward on Thursday July 29 2004, @11:12AM (#9832529)
    Guys, I'm really so excited about this. I ran around proclaiming the news about bash-3.0 in my department. Not too many people got excited (I work in Psychology) but check this out:

    [user@mitral user]$ echo $BASH_VERSION
    2.05a.0(1)-release
    [user@mitral user]$ a | b |cat
    bash: a: command not found
    bash: b: command not found
    [user@mitral user]$ echo $?
    0

    [user@mitral bash-3.0]$ echo $BASH_VERSION
    3.00.0(1)-release
    [user@mitral bash-3.0]$ set -o pipefail
    [user@mitral bash-3.0]$ a | b |cat
    bash: a: command not found
    bash: b: command not found
    [user@mitral bash-3.0]$ echo $?
    127

    Feel the love!