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."
Perhaps this year, Linux will be ready for the desktop.
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
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.
i'll wait for 4.2
So, I'm gonna grab the source to BASH and compile it using GCC under BASH? My brain hurts :).
512 MB RAM, 20 GB disk, 200 GB transfer, five datacenters. $19.95/month.
The new major release fixes several remaining bugs in the 3.x releases
That's great, but they forgot to mention how many new bugs were introduced.
Still gay.
Don't bash it dude.
So now I can make a BASH hash, sweet!
"Murphy was an optimist" - O'Toole's commentary on Murphy's Law
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.
Does anyone have any screenshots? I always hate that when they post some great new upgrade without any screenshots.
More
The day Ruby or Python takes over from the boot grub loader for the initialization of init levels in Linux on start up is the day your statement makes sense. Until then, I think people with your attitude love one tool too much. If you don't understand BASH, you don't really understand Linux. I think OS start up is a serious script.
With your production boxes, it's generally recommended that you wait for Bash 4.0 SP1 before deploying.
#DeleteChrome
If you want your scripts to be compatible with just about every Unix, you still need to stick with /bin/sh (yes, I know, it's a compatibility mode). If you don't, might as well use a better scripting language.
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.
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!
After bootstrapping the new compiler with the old compiler, you can then use your new compiler to compile the new compiler code.
If this bothers you, stay away from recursion!
I only look human.
My mother is a halfling and my dad is an ogre, so that makes me an Ogreling
Gentoo uses bash for their init scripts citing reasons of speed.
Yeah it does show.
i think you mean sh, /bin/sh is a symlink to bash in most all Linux systems, calling bash from the sh symlink: Man page ahead::
/etc/profile and ~/.profile, in that order. The --noprofile option may be used to
inhibit this behavior. When invoked as an interactive shell with the name sh, bash
looks for the variable ENV, expands its value if it is defined, and uses the
expanded value as the name of a file to read and execute. Since a shell invoked as
sh does not attempt to read and execute commands from any other startup files, the
--rcfile option has no effect. A non-interactive shell invoked with the name sh
does not attempt to read any other startup files. When invoked as sh, bash enters
posix mode after the startup files are read.
/bin/csh is usually a symlink to /bin/tcsh in most all Linux systems.
If bash is invoked with the name sh, it tries to mimic the startup behavior of his- torical versions of sh as closely as possible, while conforming to the POSIX stan- dard as well. When invoked as an interactive login shell, or a non-interactive shell with the --login option, it first attempts to read and execute commands from
Politics is Treachery, Religion is Brainwashing
I'm sorry, but /etc/rc.d/rc.sysinit is certainly not empty on my Fedora boxes. It also contains a lot of good functionality that matters to system start-up.
- Michael T. Babcock (Yes, I blog)
Do you use bash on a day to day basis?
I love using bash scripting inline, so to speak. The speed that you can get complex things done on the commmand line (and you might be surprised how much you can do with a little ingenuity) is due in no small part to the flexibility of the bash scripting language.
Sure, you could fire up vi (or perhaps nano?) and write a "serious" script to help you get the job done, but my way's quicker.
You feel sleepy. Close your eyes. The opinions stated above are yours. You cannot imagine why you ever felt otherwise.
it would be quite cool if they could set up at least something something resembling homepage.
you know, the thing with announcements, news, and, ooooh, release notes !
wiki probably would be too much to ask.
Rich
Tons of fun for a certain kind of hacker, but not of any interest for people writing serious scripts.
Most serious scripts are (and continue to be) written using /bin/sh. Maybe your definition of serious is something different?
But the scripting community has moved on, and doesn't really care that Bash or Csh now have features that other scripting languages acquired decades ago.
Huh? Some of the new features are welcome for interactive use, and bash is extremely popular in that regard. Feature parity (in a general hand-wavy sense) doesn't exist between bash, csh, zsh, etc., so decades later, the choice of shells remains important, as does continued development.
Personally I use bash (with plenty of Perl one-liners thrown in for good measure), but I'd be misguided to think that bash (or Perl) is available everywhere, or didn't concede that other shells do certain things far better.
Weird, because Debian moving away from bash to dash for exactly the same reasons.
http://www.nabble.com/Making-init-scripts-use-dash-td4458217.html
Instead of rm -rf /, we can now just say
rm -f /**
Now that's an improvement!
æeee!
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.
You're an idiot.
The shell is my file manager, and my entire dev toolchain works from the shell. Shell scripting is better suited to linking together unix commands that pipe text between one another. I don't particularly want any scripting interpreters other than bash and awk to be _required_ on my systems. I like lua and javascript, some folk prefer perl, python or ruby but nobody is getting very far on a unix-like system without /bin/sh and the de-facto standard for that is bash.
I'm seeing release candidate versions of bash 4 in the SRPMS dir for Fedora testing. It should be easy to rebuild it on Fedora 10 and install it, but I'd like to know if it would break existing scripts.
Does anyone know if it has any backward compatibility issues?
Judging by the number of Windows machines that are active members of botnets, it's not just the Linux desktop "MOST users" are not ready for.
I don't care why you're posting AC
Yes, I am complaining about the default behavior.
How about if we made the default for mv to delete blocks as they were copied and not wait to delete to original until a full copy was made. This would be 'good' (more efficient) most of the time and break in strange corner cases, losing the users data (not a good thing^TM).
The default behavior should *NOT lose data*. To do so is bad UI design.
-- The morphemes of your disquisition are ascertainable, but they have eschewed an ambit of transpicuous exposition.
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.
What's the point? It's worthless on my multi-touch screen. Only crusted headed, unbathed, girlfriendless uber geeks need to use the CLI.CLI's are so 1940's Get with the times you gezzers.
Hey, I am not an "uber"!
#DeleteChrome
by typing csh, you're loading the c shell and leaving bash. Parent asked for compatibility mode.
Hilarity ensues.
As for why you should care which shell is which, you probably don't. You'd only care if you were using more advanced features or scripting. A quick google will show you all your shell can do. It's impressive, really.
:x
Use i.e. as a stand-in for "that is."
I prefer to use Firefox.
The creator of this post (Jacob Smith) hereby releases it, and all of his other posts, into the public domain.
...MOST users.
To be fair, most users have trouble setting the clock on a VCR.
When did bash become the "de-facto standard"? I work at Sun, which has been in the Unix business for a couple decades. The most common interactive command line here is csh. (Bill Joy being the original head of software probably had something to do with that.) Most software developers here do prefer bash to csh, especially for scripting. But if somebody tried to tell them they couldn't use any other scripting language, they'd probably quit all at once. If you asked them what the de-facto standard was, I think they'd all say Perl. Even the ones that hate Perl.
Your religiousity about bash may work for you, but it wouldn't for most people. I'm a writer, not a developer, but I do need to write the odd small program now and then. The other day I wrote a 20-line Perl script that pulls a list of names off a web site, looks them up in an LDAP database, and saves retrieved user data in a text file. (The point is to synchronize a web site user access list that I maintain with one that I don't.) I'm sure I could do it as a shell script, but it would be a lot more complicated, and probably a bit less efficient.
Is there a single Linux (or Unix) user without some knowledge of bash?
Yes, lots and lots. At my house, for example, we have eight Linux users, but only two of them have any knowledge of bash. At my aunt's house, there is one user of Linux, but none with any knowledge of bash. Depending on how far you're willing to stretch the definition, every person with a TiVo could be considered a Linux user, and very few of them are likely to have any knowledge of bash. Etc., etc.
Or do "set -o inc_append_history" in zsh.
(I'm not sure if the option is case sensitive. It may need to be in CAPS, the lameness filter made me change it)
We hope your rules and wisdom choke you / Now we are one in everlasting peace
WHOOOSH
I was following this discussion of bash, sh, csh and tcsh perfectly well, but now I'm lost. What shell are you talking about?
Gentoo uses bash for their init scripts citing reasons of speed.
Weird, because Debian moving away from bash to dash for exactly the same reasons.
Like the way Red Hat uses nash?
Or the way Microsoft uses cash?
I apologize, but I saw the opening and had to take the shot.
Power does not corrupt - power attracts the corrupt.
He has a garage, fixes cars. He LOVES people that don't think they need to operate their car. Some lovely person puts petrol in the company van, ah christmas come early! Oil light been on since "Oh I just ignore that as the car starts fine with it on", we will eat tonight!
The simple fact is that we got to know a lot of stuff and if we don't we pay other people a LOT of money for knowing their stuff. 175 euro for 15 minutes work unglogging a toilet because some female doesn't know you can't put femine hygiene products down the toilet.
50 euro to run a set of automated tools on your PC to clean it, total labor involved, inserting a USB stick, you got to bring the PC in, during quiet hours and pick it up yourself, no warranty.
My neighbour changed his the nature of his small construction firm, he no longer does projects for clients, he assists DIY'ers with theirs. To translate, he charges a FORTUNE to fix the mess they made and has their free labor to help out with simple but expensive to hire a pro for tasks.
Everytime somebody like you defends people not having to know the tools they use, somebody somewhere sees dollar signs.
MMO Quests are like orgasms:
You may solo them, I prefer them in a group.
"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."
Translation: "Most of us would try it out if only it was easy to do so and we had the freedom to easily install and use Linux software, but we don't, because software installation standards have yet to be worked out and right now it's annoying as hell tracking down the dependencies manually and struggling through the compilation process. Instead, we'll rely on distro companies to give us access to software instead of being able to download and run like Mac and Windows users have the luxury of doing."
Yeah, I'm sure I'll hear the "if they want to try out BASH then they probably know how to compile already" argument, but a) that doesn't make it any less annoying, just because you like using the command line doesn't mean you hate convenience, and b) I'm speaking generally about the sever lack of Linux binaries in existence, and the complete lack of nice installation packages unless you get lucky and someone targeted your specific version of your specific distro.
Once Linux application installation becomes a snap, so any Linux users can easily share software, you will see a much greater proliferation of Linux programs out there, torrents etc, because it will actually be useful keeping archives of packages because they won't go obsolete in 6 months. Once users can easily share Linux programs, it will help make Linux adoption sore and Linux users who don't want to or don't know how to compile will finally be free of suckling on distro companies for their software milk.
Promote true freedom - support standards and interoperability.