3 ms·
> Bash is everywhere No, it isn't. Here's the Unix spec (http://www.opengroup.org/onlinepubs/007908799/ http://www.opengroup.org/onlinepubs/007908799/), search
by silentbicycle 16y ago
> Bash is everywhere
No, it isn't. Here's the Unix spec (http://www.opengroup.org/onlinepubs/007908799/ http://www.opengroup.org/onlinepubs/007908799/), search it for bash and you won't get anything. That's a Linuxism (http://www.google.com/#q=linuxism http://www.google.com/#q=linuxism), but it's not even on every kind of Linux.
The only standard shell on Unix is the bourne shell, and having things break because someone ignorantly hardcoded bash without using any bash-specific extensions is really annoying.
I agree it's worth the time to find a shell you like and customize it, but that's not a good reason to pick bash.
- lukehasnoname 16y agoWhich Linux distros with more than 5 downloads DON'T have bash as the login shell?
- AlecSchueler 16y agozsh is the login shell on PureDyne as far as I remember. It does have bash installed by default though.
- silentbicycle 16y agohttp://openwrt.org/ http://openwrt.org/ , and embedded stuff in general, because bash is incredibly bloated.
- Mod_daniel 16y agoPlease, correct me if I'm wrong, but doesn't OpenWrt run on on busybox? Which is pretty much just a stripped down conglomerated bash?
- silentbicycle 16y agobash refers to a specific shell implementation, not the whole userland utilities (AKA the "coreutils"). BusyBox combines a bunch of Linux userland utilities into one executable, to save overhead on embedded systems. It uses ash, not bash.
- bch 16y agoOf course BSD isn't Linux, but NetBSD, FreeBSD, and surely (I'm guessing) OpenBSD don't have Bash installed by default. I'd bet Dragonfly is same.
- deleted 16y ago[deleted]
- cageface 16y agoI don't remember the last time I touched a unix other than Linux or OSX. I don't expect to anytime soon either. It's not out of prejudice either, that's just what people seem to use for most things now. I'm not really willing to sweat hypothetical portability issues between the shell scripts I write for my Linux environments and some potential solaris/bsd user down the road either.
- silentbicycle 16y agoI don't care what you use for your own shell scripts* , I just have a problem with recommending that someone use bash because "it's everywhere". I think people are better off coding to a standard shell (as necessary), and otherwise using whatever shell makes them happy for day-to-day use. bash isn't actually the former, though, and it has strong competition for the latter, so it's probably a bad compromise. I've also done porting for OpenBSD, and the whole bash thing is a pet peeve of mine. It's not just me, though - look at the situation with Debian and eglibc due to bugs like these (http://sources.redhat.com/bugzilla/show_bug.cgi?id=3266 http://sources.redhat.com/bugzilla/show_bug.cgi?id=3266 http://sources.redhat.com/bugzilla/show_bug.cgi?id=9901 http://sources.redhat.com/bugzilla/show_bug.cgi?id=9901). * I mean, how many other problems in software are due to people prematurely overgeneralizing?
- cageface 16y agoI think people are better off coding to a standard shell (as necessary), and otherwise using whatever shell makes them happy for day-to-day use. Sure. I'm just saying that, in my own case, switching from zsh to bash has meant that instead of worrying about making sure that zsh is installed and up to date on all my systems and that all the various addons and plugins I used to need for zsh are available, I just have to make sure my .bashrc is available. And even if it isn't I don't lose much. So I get a functional, familiar environment in all the cases that matter to me with no extra hassles.
- akkartik 16y agoMy favored point on that continuum is to skip the 'various addons and plugins' and just apt-get install zsh on all my machines. To skip zsh altogether seems like throwing the baby out with the bath water. I tend to think of it as a better bash implementation.