Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Announcements GNU is Not Unix Operating Systems Software Unix Linux

Bash 3.0 Released 507

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."
This discussion has been archived. No new comments can be posted.

Bash 3.0 Released

Comments Filter:
  • by Just Some Guy ( 3352 ) <kirk+slashdot@strauser.com> on Thursday July 29, 2004 @11:25AM (#9831928) Homepage Journal
    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.
  • A new version? (Score:5, Interesting)

    by moonbender ( 547943 ) <moonbenderNO@SPAMgmail.com> on Thursday July 29, 2004 @11: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.
  • Neat (Score:5, Interesting)

    by stratjakt ( 596332 ) on Thursday July 29, 2004 @11: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.
  • Apple helping out (Score:5, Interesting)

    by Macka ( 9388 ) on Thursday July 29, 2004 @11: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 Anonymous Coward on Thursday July 29, 2004 @11:37AM (#9832114)
    can you give an exmaple of your .zshrc or whatever dot file you use?
  • by Anonymous Coward on Thursday July 29, 2004 @11:40AM (#9832147)

    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.

  • by Etcetera ( 14711 ) * on Thursday July 29, 2004 @11:41AM (#9832171) Homepage

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

  • by Fred Or Alive ( 738779 ) on Thursday July 29, 2004 @11:45AM (#9832218)
    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...
  • Just wondering... (Score:4, Interesting)

    by Kynde ( 324134 ) <kynde@[ ].fi ['iki' in gap]> on Thursday July 29, 2004 @11:48AM (#9832248)

    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.
  • by opk ( 149665 ) on Thursday July 29, 2004 @11:52AM (#9832299) Journal
    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.
  • by dara ( 119068 ) on Thursday July 29, 2004 @11:54AM (#9832323)
    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
  • Re:Just wondering... (Score:3, Interesting)

    by jandrese ( 485 ) * <kensama@vt.edu> on Thursday July 29, 2004 @11:56AM (#9832348) Homepage Journal
    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.
  • by Esel Theo ( 575829 ) on Thursday July 29, 2004 @12:01PM (#9832402)
    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?
  • Re:Just wondering... (Score:2, Interesting)

    by DrFatal ( 587634 ) on Thursday July 29, 2004 @12:08PM (#9832477)
    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 :)
  • by Just Some Guy ( 3352 ) <kirk+slashdot@strauser.com> on Thursday July 29, 2004 @12:09PM (#9832492) Homepage Journal
    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.

  • by Anonymous Coward on Thursday July 29, 2004 @12:12PM (#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!
  • Re:Neat (Score:2, Interesting)

    by bmf033069 ( 149738 ) on Thursday July 29, 2004 @12:21PM (#9832617)
    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.
  • by JimDabell ( 42870 ) on Thursday July 29, 2004 @12:29PM (#9832733) Homepage

    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.

  • Er...it's not here! (Score:2, Interesting)

    by dadman ( 576569 ) on Thursday July 29, 2004 @12:38PM (#9832831)

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

  • by devphil ( 51341 ) on Thursday July 29, 2004 @12:43PM (#9832896) Homepage


    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.

  • by Noksagt ( 69097 ) on Thursday July 29, 2004 @02:10PM (#9834297) Homepage
    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.
  • by taradfong ( 311185 ) * on Thursday July 29, 2004 @03:35PM (#9835561) Homepage Journal
    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/ [mattwalsh.com]

    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.
  • by mattcasters ( 67972 ) on Thursday July 29, 2004 @04:51PM (#9836627) Homepage
    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

Get hold of portable property. -- Charles Dickens, "Great Expectations"

Working...