Slashdot Mirror


Bash 3.0 Released

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

116 of 507 comments (clear)

  1. I'm still waiting for a feature by Stevyn · · Score: 4, Funny

    ...a GTK front end

    1. Re:I'm still waiting for a feature by BrokenHalo · · Score: 4, Insightful
      ...a GTK front end

      There is. Try zenity.

    2. Re:I'm still waiting for a feature by Apreche · · Score: 4, Funny

      gnome-terminal, duh.

      --
      The GeekNights podcast is going strong. Listen!
    3. Re:I'm still waiting for a feature by Ari_Haviv · · Score: 3, Funny

      how about...wizards?

      --
      Join Team Mozilla #38050 Folding@home
    4. Re:I'm still waiting for a feature by SirPrize · · Score: 5, Funny
      From the Zenity web page:

      Zenity lets you display Gtk+ dialog boxes from the command line and through shell scripts. It is similar to gdialog, but is intended to be saner. It comes from the same family as dialog, Xdialog, and cdialog, but it surpasses those projects by having a cooler name.

    5. Re:I'm still waiting for a feature by liquidsin · · Score: 4, Funny
      How about Clippy?

      Hi! You appear to be typing something at the command prompt. It does not appear to be english. Maybe I can help. Would you like me to:
      • spell-check it for you?
      • change your local settings to another language?
      • do nothing: sleeping on keyboard
      • do nothing: that's PERL, you insensitive clod!
      • fuck off
      --
      do not read this line twice.
    6. Re:I'm still waiting for a feature by ultranova · · Score: 2, Informative

      ...a GTK front end

      Try gnome-terminal, it's what I'm using. Apart from being a bit unstable, it works fine.

      I sometimes also use a combination of VNC and Xterm. Not as pretty or refined (doesn't have tabs) but otherwise fine.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

  2. First "zsh rules" post! by Just+Some+Guy · · Score: 5, Interesting

    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.

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:First "zsh rules" post! by Anonymous Coward · · Score: 2, Informative

      zsh is nice, but bash still has its applications. I run zsh on most places, but my laptop, and servers that are somewhat underpowered, stick with bash as a nice balance between the baroque zsh and a lightweight, but less usable shell.

    2. Re:First "zsh rules" post! by Anonymous Coward · · Score: 3, Insightful

      insightful? please at least give a few reasons why zsh is better. I use bash, but i'm open to other possibilities.

    3. Re:First "zsh rules" post! by BrokenHalo · · Score: 2, Informative
      Indeed: I've been a zsh convert for a while now (since I'm a slowish and lazy typer), and zsh is just the best shell environment by far.

      As far as scripting is concerned, however, there's not a great deal of difference between zsh and bash, since the former is quite compatible with the latter.

    4. Re:First "zsh rules" post! by Anonymous Coward · · Score: 5, Funny

      Will everyone stop with the Bash bashing, please?

    5. Re:First "zsh rules" post! by opk · · Score: 5, Informative

      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.

    6. Re:First "zsh rules" post! by Just+Some+Guy · · Score: 4, Informative
      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.

      --
      Dewey, what part of this looks like authorities should be involved?
    7. Re:First "zsh rules" post! by Just+Some+Guy · · Score: 2, Informative
      --
      Dewey, what part of this looks like authorities should be involved?
    8. Re:First "zsh rules" post! by Just+Some+Guy · · Score: 4, Informative
      As the maintainer of FreeBSD's bash-completion 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.

      --
      Dewey, what part of this looks like authorities should be involved?
    9. Re:First "zsh rules" post! by Nachtfalke · · Score: 4, Informative

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

    10. Re:First "zsh rules" post! by Just+Some+Guy · · Score: 2, Informative
      Oh! That may be problematic for posting on a web page. The line actually reads:
      bindkey '^?' backward-delete-char
      where '^?' is actually the single CTRL+? character. If anybody knows a cleaner way to write that, please let me know and I'll amend the page.
      --
      Dewey, what part of this looks like authorities should be involved?
    11. Re:First "zsh rules" post! by Theolojin · · Score: 2, Funny

      Will everyone stop with the Bash bashing, please?

      So you watched the Democratic National Convention, huh?

      Oh...

      *bash* bashing. heh.

      --
      Life is short; think quickly.
  3. A new version? by moonbender · · Score: 5, Interesting

    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.

    --
    Switch back to Slashdot's D1 system.
  4. On the list of changes: by meringuoid · · Score: 5, Funny
    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?

    --
    Real Daleks don't climb stairs - they level the building.
    1. Re:On the list of changes: by grub · · Score: 4, Insightful


      I'm wondering why it's in the "LINUX" section of /. Bash is used across many different OSs.

      --
      Trolling is a art,
    2. Re:On the list of changes: by Anonymous Coward · · Score: 3, Informative
      Amusing comment noted but to stop any salacious rumours in the bud I shall quote the changelog -- cunningly named changelog in the archive.
      SCO Unix 3.2, like Solaris, requires that the system's `timezone' variable be declared as long
    3. Re:On the list of changes: by Prowl · · Score: 4, Informative

      GNU or Unix would seem to be the most appropriate

      bash has been around since 1989 (according to copywrite on man page). Linux 1.0 came around 5 years later.

      The editors should know better, unless they're intentionally trying to piss off RMS

      --
      That man tried to kill mah Daddy
    4. Re:On the list of changes: by sigxcpu · · Score: 2, Funny

      Does that mean that Solaris stole their 'timezone' from SCO?

      --
      As of Postgres v6.2, time travel is no longer supported.
  5. Neat by stratjakt · · Score: 5, Interesting

    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.

    --
    I don't need no instructions to know how to rock!!!!
    1. Re:Neat by DAldredge · · Score: 5, Funny

      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)

    2. Re:Neat by Brad+Moore · · Score: 5, Informative

      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.

    3. Re:Neat by pete-classic · · Score: 4, Funny

      It supports a new sequence brace expansion which should make snarfing porn easier and more efficent.

      Does it get more exciting then that?

      -Peter

    4. Re:Neat by ellem · · Score: 5, Funny

      As part of the deal with Apple making fixes they need to get Bash to version 10 ASAP for Bash X marketing.

      --
      This .sig is fake but accurate.
    5. Re:Neat by BrokenHalo · · Score: 2, Informative
      if you're running Slackware 9 on a Pentium III 2600MHz with 512MB of RAM, you are so five minutes ago.

      No. You are 15 months ago. Slackware 9 was succeeded by 9.1 on 2003-09-26 and 10 on 2004-06-23.

    6. Re:Neat by Jugalator · · Score: 5, Funny

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

      Pfft... I thought geeks browsed Slashdot!

      --
      Beware: In C++, your friends can see your privates!
    7. Re:Neat by Chris_Jefferson · · Score: 5, Informative

      The main difference is full internationalisation support, which deserves a full version upgrade :)

      Unless you have scripts which used the old slightly dubious (but still not bad) internationalisation then you should notice no differences at all. There are a couple of really, really stupid looking scripts which now produce something different, but in almost every single case the new answer is I'm sure what everyone expected to appear before :)

      --
      Combination - fun iPhone puzzling
    8. Re:Neat by IWannaBeAnAC · · Score: 2, Informative
      You mean something like
      wget http://porn.com/image{1..300}.jpg ?

      Neat! (assuming I got the syntax right;)

    9. Re:Neat by KodaK · · Score: 5, Funny

      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?

      --
      --J(K) DOS is like Unix in exactly the same way that a pinto is like an aircraft carrier.
    10. Re:Neat by A+Big+Gnu+Thrush · · Score: 4, Funny
      Pfft... I thought geeks browsed Slashdot!

      Real geeks do browse /.

      Only lusers post.

      Oh, wait...damn.

    11. Re:Neat by bmf033069 · · Score: 2, Interesting

      How about supporting that syntax directly in a browser? It would be nice to drop http://porn.com/image{1..300}.jpg right into the location bar.

    12. Re:Neat by cant_get_a_good_nick · · Score: 4, Funny

      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.

    13. Re:Neat by carpe_noctem · · Score: 3, Funny

      ...either that or change the project name to "iBash".

      hrms, that's kinda catchy, aint it?

      --
      "Quoting famous computer scientists out of context is the root of all evil (or at least most of it) in programming." - K
    14. Re:Neat by Megaweapon · · Score: 2, Funny

      As part of the deal with Apple making fixes they need to get Bash to version 10 ASAP for Bash X marketing.

      "I was writing a command string in the bash shell, and it was, like, beep, beep, beep, beep, beep, and then, like, half of my grep string was gone. And I was, like ... huh? It devoured my regex pattern. It was a really good pattern. And then I had to do it again and I had to do it fast so it wasn't as good. It's kind of a bummer."

      --
      I'm sure "SlashdotMedia" will improve on all the wonders that Dice Holdings blessed us all with
    15. Re:Neat by drinkypoo · · Score: 2, Informative

      The world could learn something from IBM here. In at least AIX and maybe other IBM operating systems, when you run a command and you get an error message, each error message has a unique ID which can be used to look up errors. Presumably these IDs are identical from one language to the next. IIRC they are four bytes, displayed in hex. They are probably unique only to a given executable these days, but might correspond to an AIX version (or other OS version) instead.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    16. Re:Neat by KozmoStevnNaut · · Score: 2, Funny

      Great.

      I've been waiting to refine that command which I also never use.

      --
      Eat the rich.
    17. Re:Neat by rm+-vrf · · Score: 2, Informative

      Download curl, then you can do stuff like

      curl http://hugetractsofland.com/{amy,crystal}/[01-05]/ img[1-99].jpg -o "#1#2-#3.jpg"

      The perfect command....which I've yet to find a use for. um..yeah.

  6. Not much changed by opk · · Score: 5, Insightful

    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.

  7. Bashing linux at slashdot by badriram · · Score: 2, Funny

    I am looking at the title going a Linux bash headline on slashdot, now i must have been dreaming. But I am sure that i would not post that here, knowing i would loose all my karma in one stroke.

  8. Apple helping out by Macka · · Score: 5, Interesting

    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.
    1. Re:Apple helping out by hot_Karls_bad_cavern · · Score: 5, Insightful

      "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 :)

    2. Re:Apple helping out by russint · · Score: 2, Insightful

      Sure, they created a great gui. But when is it going to be ported to x86?

      --
      ^^
    3. Re:Apple helping out by asuffield · · Score: 2

      > to deny that Apple has created one of the most user-friendly, beautiful, slick gui's for *nix is crazy.

      Well then colour me crazy, because that awful thing is ugly, clumsy, and slow. It's like having a glowing orange pogo stick, when you could be driving a car.

      Even the UI fanboys have stopped being Apple fanboys these days; where they used to do nothing but sing hymns of praise to Apple all day, now they spend their time complaining about how awful that same product is.

      I find this PR campaign Apple are pursuing, where they paint themselves as "community members" or as being friendly to free software, to be rather tasteless. It's nothing but "let them eat cake". People fall for it (inevitably, because people are stupid), but that doesn't change anything.

  9. Dear Apple haters... by TheHonestTruth · · Score: 5, Informative
    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

    --

    I had a steady B+ in my AI class until I failed the Turing test...

    1. Re:Dear Apple haters... by Fred+Or+Alive · · Score: 2, Interesting

      The one thing I find weird with Apple adding stuff to bash is that's Mac OS X's default shell is tcsh. But it is nice of Apple anyway...

      --
      10 PRINT "LOOK AROUND YOU ";
      20 GOTO 10
    2. Re:Dear Apple haters... by Jahf · · Score: 5, Informative

      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.

      --
      It is more productive to voice thoughtful opinions (reply) than to judge (moderate) others.
    3. Re:Dear Apple haters... by paco+verde · · Score: 2, Funny
      IBM works on many projects and gives back ... plus contributing all new things like JFS.

      err...didn't they just steal that from SCO?

  10. Re:People still use a shell for Linux? by ylikone · · Score: 3, Insightful
    Because you can NEVER be quite sure of what files are being manipulated when you are using a GUI.

    Why use a middleman when you have access to the source?

    --
    Meh.
  11. Movie Tie-in by Bistronaut · · Score: 4, Funny

    They should have called the movie Bourne Again.

  12. It's...it's... by FreemanPatrickHenry · · Score: 5, Funny

    The Bourne Again and Again and Again Shell! Again!

    --
    I have discovered a truly marvelous .sig which, unfortunately, this space is too small to contain.
  13. When are they going to upgrade MY shell? by g_adams27 · · Score: 4, Funny


    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!

    1. Re:When are they going to upgrade MY shell? by opk · · Score: 2, Interesting

      It's probably not too hard to break out of the restricted shell if you really put your mind to it. I've seen a shell where "command -p sh" would do the job. It isn't that widely used and is rarely used for anything where security really matters. I've never heard of anyone doing a serious study of it. If security matters to you, I wouldn't rely on it.

    2. Re:When are they going to upgrade MY shell? by ryanvm · · Score: 3, Insightful

      Insightful? You morons, it's a joke.

  14. bash = "embrace and extend" proprietary crap by Anonymous Coward · · Score: 2, Interesting

    I seriously hope they've fixed that bag. Since a lot of GNU/LNUX distros don't even ship with a real sh, but symlink to bash. Some random linux bozo makes a #!/bin/sh script thinking it will be portable, but bash (at least 2.x does) forgets to switch off some features when invoked as /bin/sh, so in the end you write a non-portable script. And listen, linux people, /bin/bash is not standard!

    Alfred, tired of fixing stupid scripts that assume the whole world has bash in /bin.

    1. Re:bash = "embrace and extend" proprietary crap by Anonymous Coward · · Score: 2, Funny

      /bin/bash is standard on my computer.

    2. Re:bash = "embrace and extend" proprietary crap by pohl · · Score: 4, Insightful
      Proprietary \Pro*pri"e*ta*ry\, a. [L. proprietarius.]
      Belonging, or pertaining, to a proprietor; considered as
      property; owned; as, proprietary medicine.
      [1913 Webster]

      Seems like an odd word to use to describe free software. Try not to lip-sync to the jargon, dude.

      --

      The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...

  15. Looks great, but prefer Ash for scripts by Etcetera · · Score: 2, Interesting


    Looks like a nice Unicode-savvy release that should help with dealing with international languages at the command line. And yay to Apple for giving back (again). When will people finally accept that Apple is indeed helping out the OSS community through GCC, bash, and other tools...?

    Kind of off-topic, but for speed purposes in scripts that have to run fast, I find nothing better or more convenient than Ash, especially on systems where /bin/sh is a symlink to /bin/bash.

    Does anyone know any history on this shell? Is it a clone of the original bourne shell or of bash? I can't seem to find anything useful on Google ...

    1. Re:Looks great, but prefer Ash for scripts by Stephen+Williams · · Score: 2, Informative

      Ash (or dash, as it's called nowadays) is a Linux port of NetBSD's /bin/sh. It's a POSIX shell with separate lineage from bash.

      http://gondor.apana.org.au/~herbert/dash/

      It's /bin/sh on my system too. Faster and smaller than bash; watch those configure scripts fly!

      -Stephen

  16. Bourne Supremacy by stoolpigeon · · Score: 2, Funny

    I can't be the only one who snickers every time I see a commercial for this film. Think Geek used to have a "Bourne Again Believer" t-shirt but I think they dropped it. Maybe I am the only one.

    --
    It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
  17. POSIX Compliance issues. by Ashe+Tyrael · · Score: 5, Informative

    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

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

    Lovely.

    --
    "How fine you look when dressed in rage."
    1. Re:POSIX Compliance issues. by AT · · Score: 2, Informative

      If you use bash specific features, you should be starting your shell scripts with #!/bin/bash (or #!/usr/bin/bash, depending on the installation path) instead of #!/bin/sh. With bash 3, the former allows the non-POSIX stuff that bash has always allowed, but the latter disallows at least some of it.

    2. Re:POSIX Compliance issues. by keesh · · Score: 4, Informative

      It's a problem with autoconf, not with any Gentoo-specific scripts. You're just more likely to see it on Gentoo given how much you end up running autoconf :)

  18. MSH by Jugalator · · Score: 4, Funny

    Ha ha, you dorks, use MSH like a man!

    I wonder how this will get modded? :-o

    --
    Beware: In C++, your friends can see your privates!
  19. POSIX by Waffle+Iron · · Score: 5, Funny
    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.
  20. Re:People still use a shell for Linux? by gowen · · Score: 5, Informative
    Why type when you can just point and click?
    Batch jobs. You just can't beat
    for i in img*.jpg; do convert $i $(basename $i .jpg).png; done


    Everything else, I do in emacs...
    --
    Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
  21. Just wondering... by Kynde · · Score: 3, Interesting


    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.

    --
    1 Earth is warming, 2 It's us, 3 it's royally bad, 4 we need to take action NOW
    1. Re:Just wondering... by jandrese · · Score: 2, Interesting

      Bash is so hot because it is the default shell in most Linux installs. Zsh is hidden off somewhere in the package system, so you have to know about it to try it out. Because all of these people who make distros started with Bash, they assume everyone else is using it too and perpetuate the cycle.

      It's the same reason IE is still the de-facto browser on the internet, for most people it came with the system. Also, if you jump around on lab machines or on other people's machine, more often than not they don't have zsh installed and you're forced to remember all of the bash syntax anyway. That said, I still use zsh for all of my machines, because the completion engine is smarter and I've got many k worth of .zshrc files built up over the years that I'd hate to have to port over to another shell.

      --

      I read the internet for the articles.
    2. Re:Just wondering... by opk · · Score: 5, Informative

      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.

    3. Re:Just wondering... by DrFatal · · Score: 2, Interesting

      The fact that zsh can't handle multibyte characters correctly was the deciding factor for me, if they ever get around to do it in zsh I might give it a whirl again. bash 2.05b does a good job with my filenames containing utf-8 multibyte characters, so whatever the additions to that code are in 3.0 I'll probably not notice :)

  22. Breaks Gentoo by Kujah · · Score: 4, Informative

    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)

    1. Re:Breaks Gentoo by Requiem · · Score: 2, Funny
      Breaks Gentoo

      Seriously? Damn. Ideologically, that's all the reason I need to upgrade!

  23. once upon a time... by TheHonestTruth · · Score: 5, Informative
    tsch was the deafult for OS X and for Jaguar I believe, but they moved to bash for Panther.

    -truth

    --

    I had a steady B+ in my AI class until I failed the Turing test...

    1. Re:once upon a time... by Short+Circuit · · Score: 2, Funny

      I'm sure there are plenty of people here who will change it for you if you give them your IP address and root access. :)

  24. Re:People still use a shell for Linux? by datastalker · · Score: 2, Informative

    Ok, please tell me how I can change the SOA on 150 domain files all at once with pointing and clicking. In bash, it's: sed -i s/oldSOA/newSOA/g * Until there's a way to do search and replace on any number of files that's easier than that, the command line will still be useful.

  25. Can arrow key history be like Matlab's? by dara · · Score: 3, Interesting

    I read the announcement and it mentions "History traversal with arrow keys", but what I would really like doesn't seem to be mentioned (but perhaps it is possible with bash-2.05, I'm not much of a shell expert). In Matlab, the up-arrow key searches the history for commands that match all the characters on the line. No characters and it acts like a normal bash arrow, if "figure, plot" is at the beginning of the line, it will quickly scroll through all plotting commands that have been entered at the shell.

    Any idea if this is possible?

    Dara Parsavand

    1. Re:Can arrow key history be like Matlab's? by Anonymous Coward · · Score: 3, Informative

      cat >> ~/.inputrc
      "\e[A": history-search-backward
      "\e[B": history-search-forward
      ^D

  26. Bash isn't Linux by gorim · · Score: 3, Insightful

    Bash is a portable tool that existed long before Linux did. It is not specific or particular to Linux. So why in the world does this get posted under the category of Linux ?

  27. History timestamps! by straponego · · Score: 5, Informative

    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.

  28. Re:People still use a shell for Linux? by Atzanteol · · Score: 4, Funny
    find . -type f -exec chmod a+r \{\} \;
    find . -type d -exec chmod a+rx \{\} \;
    Or would you rather go through every file in ~/public_html, right-click on it, and change the perms?
    --
    "Ignorance more frequently begets confidence than does knowledge"

    - Charles Darwin
  29. Re:People still use a shell for Linux? by Idealius · · Score: 3, Insightful

    The same can happen using the shell.

    When you run a binary from the shell are you ever sure what files it's accessing?

    If you log it, sure -- but there are tools to do that in the GUI, too.

  30. Re:People still use a shell for Linux? by Esel+Theo · · Score: 2, Interesting
    Why type when you can just point and click?
    Well, for me it's more like ``Why point and click when you can just type.'' Pointing and clicking seems to be quick and productive only on the first view. Have you ever seen somebody who really knows how to work in a text terminal?
  31. Re:People still use a shell for Linux? by simetra · · Score: 3, Insightful
    Many Linux distributions are installed as servers and require no GUI. Many aren't even hooked up to a monitor, much less a mouse. Cron jobs and other stuff can do shell stuff as whatever user you specify. Users can telnet/rlogin/ssh in and do stuff. The shell is very important in this regard. In fact, your pretty gui probably uses the shell way more than you're aware.

    --

    "Would it kill you to put down the toilet seat?" -- Maya Angelou
  32. Is BASH Linux specific only? by vivekg · · Score: 2, Insightful

    This story comes under category Linux, wonders why? As we know bash runs under all *nix :)

    --
    The important thing is not to stop questioning --Albert Einstein.
    1. Re:Is BASH Linux specific only? by the+chao+goes+mu · · Score: 2, Informative

      I had it running on Windows as well. Default shell for cygwin.

      --
      Boys from the City. Not yet caught by the Whirlwind of Progress. Feed soda pop to the thirsty pigs.
  33. bash completion getting better by AT · · Score: 2, Informative

    The completion ability of bash has been steadily improving. There is a nice script here that sets up a lot of good completion rules for bash.

  34. Because you are not me by Just+Some+Guy · · Score: 3, Interesting
    There's an old saying: "there's no accounting for tastes". Most people take that to mean that you just can't explain why other people like the things they do. Another valid interpretation is that you are not accountable for your tastes, meaning that you don't have to defend your preferences.

    You like using a GUI and I like using a terminal. We're two people with two preferred methods of interacting with our machines. Your way is superior - for you. My way is superior - for me. There is no point (or obligation) to argue about which is better, since "better" is not a well-ordered set in this case.

    --
    Dewey, what part of this looks like authorities should be involved?
  35. Really great feature ! by Anonymous Coward · · Score: 5, Interesting

    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!

  36. history by kungfujew · · Score: 3, Informative

    timestamped history sounds like a useful auditing feature....

  37. I read this as... by Stopmotioncleaverman · · Score: 3, Funny

    ...Bush 3.0. I was wondering why the last two incarnations of your US president were so god-awful. ;)

    1. Re:I read this as... by shadypalm88 · · Score: 2, Funny
      ...Bush 3.0. I was wondering why the last two incarnations of your US president were so god-awful. ;)
      Thankfully, in the release announcement, it says Bush 3.0 will include better internationalization support.

      (I can only dream!)
  38. Re:People still use a shell for Linux? by JimDabell · · Score: 2, Interesting

    Bad example. Using KDE, I click on my home directory icon, select the images I want to convert, right-click on one of them and pick Actions | Convert To | PNG.

    This is just as quick, doesn't require you to memorise complicated syntax, and doesn't require filenames that follow a common pattern.

  39. Re:New features? by greck · · Score: 3, Funny

    No, bash 3.0 is not compliant with RFC 2324.

  40. Er...it's not here! by dadman · · Score: 2, Interesting

    Can't seems to find it from ftp://ftp.cwru.edu/pub/bash, ftp://ftp.gnu.org/gnu/bash, nor from other mirrors.
    The most updated version is still 2.05b, not even the patch to 3.0 is available...

  41. That was a wild mod ride! by Just+Some+Guy · · Score: 4, Insightful
    Man, all I wanted to do was say that I also liked zsh. I didn't think that many people were so wrapped up in their shells.

    My post started with +2 (cause I are 1337). Then I got an "Interesting", two "Overrated"s, a "Funny", and most recently a "Flamebait".

    Come on, mods: can I have an "Insightful" and an "Underrated", too?

    --
    Dewey, what part of this looks like authorities should be involved?
  42. That was the whole point. by devphil · · Score: 3, Interesting


    The plan was to introduce new features in sub-versions like .04a, .05a, .05b. Then let them stabilize. Once the bugs were worked out, that would be 3.0.

    As opposed to most open source software, which releases x.0 as soon as it compiles, and only then starts working out the stability bugs.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  43. Re:People still use a shell for Linux? by kflash15 · · Score: 2

    Why type when you can just point and click?

    Because I type a lot faster than I mouse...

  44. READ THIS TOO by Just+Some+Guy · · Score: 2, Informative

    I amended the page for DotZshRc to point out that you really need to create both .zshrc and .zshenv from my site to get the full experience. Through this moment, over 200 people have visited the DotZshRc page, but only about 80 have seen DotZshEnv. If you're in the 120-user disjoint, then go back and snag the other one too!

    --
    Dewey, what part of this looks like authorities should be involved?
  45. Re:GUI possibilities by Atzanteol · · Score: 3, Insightful
    Sure, a GUI *can* have an advanced search tool that does what I mentioned.

    But what if I want to do:
    for i in `cat file.lst`; do wget $i -o - | convert ... ; done
    You gonna write a custom GUI app for everything? The nice thing about the command line is that it's "language oriented" rather than "picture oriented." Rather than pointing at what I want and clicking, I tell the computer what I want using a language.

    It's the same reason we don't code with a point & click interface (save for VB, but the point and click still only got you so far).
    --
    "Ignorance more frequently begets confidence than does knowledge"

    - Charles Darwin
  46. Re:People still use a shell for Linux? by ianezz · · Score: 2
    Bad example. Using KDE, I click on my home directory icon, select the images I want to convert, right-click on one of them and pick Actions | Convert To | PNG.

    Ok, now do it every morning, at 3am, except on Sundays, and move corrupted images to the trashcan.

    The point of a shell script is not to automate one-time generic tasks (that's what your context menu entry is for), but to automate one-time higly specific tasks (for which you can't reasonabily expect to have a predefined context menu entry) or unattended tasks that have to be executed many-times.

    In the end, scripting everything is dumb, but requiring your presence to do the same task by hand over and over is dumber. You know the saying, "be quiet or I'll replace you with a very small shell script", there is a reason behind that.

  47. Most? Try 1... and fixed in 40min by apachetoolbox · · Score: 2, Insightful

    It broke a script in 1 package, and was fixed in about 40minutes. What the hell are you talking about?

  48. Re:GUI possibilities by Scarblac · · Score: 3, Insightful

    Please explain to me what precludes a GUI from offering an advanced search tool, in which you can open up a property info dialog for the results and do bulk permission/property changes for. (Hint: nothing stops this from happening.)

    What you will end up with is a huge dialog with all kinds of checkboxes and text fields for the same things the command has. Making it more irritating and slower for the purpose of turning it into a shiny GUI, no thanks.

    Even if you somehow make a magically really useful GUI widget that makes me enter all the necessary information in a completely natural and quick way and achieve perfection, I cannot believe you can do that automatically for every command ever. Which means there'll be a neat widget for some commands, and the command line for the rest.

    That way lies hell. We have a perfectly good command line, thank you. If you want to make GUI frontends, perfectly fine, but don't expect us to use them.

    --
    I believe posters are recognized by their sig. So I made one.
  49. Warning, the above is a sad unix joke! by xtermin8 · · Score: 5, Funny

    I know its hard to tell, even for people famaliar with rbash; but this is what passes for humor among unix geeks.

  50. No shell scripts are really portable! by Noksagt · · Score: 2, Interesting

    I think only a few would even try to argue that they are. Most shells aren only somewhat available on non *nix OSs & many aren't available ay all off of them. Bash is, at least, reasonably available on most OSs. It is also the de facto shell standard, being found on linux and most newer *nix variants.

    Portable shell scripts are probably more impeded when they use tools that aren't part of the shell & which aren't on the target system.

    If you want true script portability, it is probably better to use something like perl. If you are concerned with writing short, simple scripts, shell scripts are fine. But not even sh is commonly interperated, & bash is VERY common, so bash isn't really an inappropriate choice.

  51. Re:Really great feature ! by Lancer · · Score: 2, Informative
    You missed the AC's point -- bash-2 returned an error code ($?) of 0, or success, in spite of the obvious failure of the pipeline. In bash-3, with pipefail set, $? holds the error code of the pipelined command that failed.

    This would obviously be very useful in scripts where the success or failure of a command in the pipleine would not be as determinable as watching it on screen interactively.

    --
    Outside of a dog, a book is man's best friend. Inside a dog it's too dark to read. - Groucho Marx
  52. It isn't and neither is the topic by trashme · · Score: 3, Informative

    You're speaking in half-truths.

    The top catagory for this story is Announcements. It is also listed under the following catagories: GNU, Operating Systems, Unix, and lastly Linux.

  53. Bash 4DOS Directory without CD by taradfong · · Score: 2, Interesting
    Remember 4DOS? They had this great feature: if you typed a directory all by itself on a command line, it would jump to that directory. It saved you typing all that cd nonsense. When you think about it, this makes sense as there is never (at least that I can think of) any other case where just typing a directory does anything else. I mean, why type...
    [user@server somedir]$ cd /etc/rc.d/rc0.d/
    ...when you could type...
    [user@server somedir]$ /etc/rc.d/rc0.d/
    It always surprised me that no one implemented this in bash, and finally I got around to doing it myself. It's a very simply change to only one file. My patch is to 2.05b - will have to do the 3.0 patch soon.

    http://mattwalsh.com/twiki/bin/view/Main/BashDirec toryJumpPatch/

    The one 'hole' is that command completion is a bit weird for the first element of a directory...if you have a directory that starts with 'ls', and you type ls <TAB> it will complete with 'ls'. Still, I find it to be very useful.
    --
    Does it hurt to hear them lying? Was this the only world you had?
  54. Bash 3.0 by cygnus · · Score: 2, Funny

    leave 3.0 alone! >:(

    --
    Just raise the taxes on crack.
  55. Better command completion from history by wowbagger · · Score: 2, Insightful

    What I would like to see Bash do is command completion a la 4DOS:

    If I have a command
    foo bar baz

    in my history, and I type
    foo<TAB>

    It complete that with the most recent command starting with "foo", and if I type
    foo<UP>
    it will cycle through the commands in history that start with "foo".

    1. Re:Better command completion from history by OldMiner · · Score: 2, Informative

      Type 'Ctrl-R' (prompt changes to read "(reverse-i-search) `':"). Type 'foo'. If this is not the foo you want, hit Ctrl-R again to find the next match.

      It's amazing how many complaints people have about their favorite shells and editors which are actually already accounted for. One just needs to take the time to read the documentation once.

      --
      You like splinters in your crotch? -Jon Caldara
  56. Re:I want Motif and full compatibility with dtksh by mattcasters · · Score: 2, Interesting

    Indeed, dtksh is nice.
    Actually, I think dtksh is the latest version of the Korn Shell around. Anybody know a more recent version?
    I especially like things such as

    >all.txt
    for ((i=1;i> all.txt
    done

    It still p*sses me off that such a simple thing can't be done with ksh. (the default shell on many HP-UX/AIX/etc boxes.)
    Features like the for loop above are mentioned in O'Reilly's Korn Shell book, but are not present in the version that's mostly available.

    0.02

    Matt

    --
    News about the Kettle Open Source project: on my blog