4 ms·
I always think — when a programming/scripting language requires this much bizarre knowledge just to write basic code that performs basic tasks, perhaps it is ti
by Xcelerate 8y ago
I always think — when a programming/scripting language requires this much bizarre knowledge just to write basic code that performs basic tasks, perhaps it is time for that language to be retired.
I really don't understand why bash still exists. I've switched to fish and am much happier with the change.
- tokyodude 8y agoI agree with you 100% It basically comes down to tradition, ubiquitousness, and stubbornness. Which is sad to me. We fix other stuff. If an exploit appears in the OS it gets patched. Yet here we have a system that basically defaults to bad behavior, un-secure. It should be redesigned/replaced with something that makes it hard to do it wrong. If not replacing then maybe adding a "safe" mode and slowly deprecating the non-safe way. Sure it may take years. So did moving from python 2 to 3 but it is happening. Maybe it will take the powers-that-be to start having their data stolen though shell exploits to realize if they made the shell hard to get wrong by default they'd be helping themselves as well?
- LeoPanthera 8y agoBecause it is ubiquitous. You can virtually guarantee that bash will be found on any arbitrary unix-like system.
- nickpsecurity 8y agoThat makes it a good idea for a compiler target for a better programming language. Not using it, though. ;)
- kazinator 8y agoSomeone thought it was a good idea to use a portable subset of the shell as a target for a worse programming language: layers of M4 macros. They didn't back away with anything like "not using it though". So now we have GNU Autotools.
- nickpsecurity 8y agoAt least the person behind that tragedy apologized in the Generation Lost in the Bazaar article's comment section. https://queue.acm.org/detail.cfm?id=2349257 https://queue.acm.org/detail.cfm?id=2349257 That one person did something damaging doesn't refute the point, though. Just avoid another M4 situation.
- deleted 8y ago[deleted]
- minikomi 8y agoSame reason I always cook my eggs using a shoe.
- xyproto 8y agoBecause a pair of shoes is always standing ready for cooking eggs in, in 99.9% of all homes?
- mihaifm 8y agoDon't make that assumption. I worked on older Solaris installations, they did have bash but the production scripts were written in ksh 88. I had to dig up obscure features of this shell in because they didn't even upgrade to the newer version ksh 93 (yes, those numbers come from their release dates...1988 and 1993).
- h1d 8y agoI keep seeing this statement but this absolutely does not apply to everybody. How often can you just install fish or use other programming language instead of being forced to use bash? It's sad people keep using the default just because of being afraid that the next system you touch might not have it and you waste tremendous amount of productivity without using something better. I know a guy who used vim with default config for that reason. Utterly nonsense.
- deleted 8y ago[deleted]
- znpy 8y agoNo one ever thinks of interoperability between people. Bash is known, to a variable depth, by pretty much every sysadmin (and a big part of being a sysadmin is being able to write shell scripts). So I might prefer the fish, and who came before me might have had a preference for zsh. So now I have to deal with three different shells: bash (default), fish (for the scripts i'll be writing from now on) and zsh (because of compatibility). Congrats. > I know a guy who used vim with default config for that reason. Utterly nonsense. I started using less and less emacs/vi(m) customization and learn more and more of the defaults for the same reason: whenever I log on a client system I am instantly proficient with the editor without stupid complaints like "but on my box is different..." . Anecdotal: I have seen people losing their editing speed/proficiency because all of a sudden they were in a clean vim session and had no one of their shiny and colorful plugins.
- h1d 8y agoWhy can you not modify the editor environment that you use often? Hard to see I need to deal with environments where I can do nothing but keep the default every time I use it. Once you get the speed that is tuned to your liking, the default sounds like you're walking with legs strapped.
- znpy 8y ago> Why can you not modify the editor environment that you use often? Because I am not the only one accessing those environments (please note the plural here). Currently there are about 13 other sysadmins in my team and we manage clients infrastructures among other things (managed services). From time to time someone from another team accesses those environment (not a sysadmin, but still familiar with the bash shell). Sometimes the client accesses those systems (rare, we try to discourage and avoid that). Can you even imagine what a mess it would be if we all started applying our own favorite settings ? (edit: fix grammar)
- kazinator 8y agoThe shell is acceptable for configuring the build of a better language. The excuse there hinges around the argument that we don't want to require the user to already have an executable version of that language installed in order to build that language from sources. And we also don't want to require some competing better language X to build our better language Y, because that doesn't look good.
- mar77i 8y agoAs a CS history lesson I think bash is extremely well fit. The UNIX shell started off at some point, and in the meanwhile it became possible to use newlines and spaces and unicode, and to have that tool still proving its usefulness after all these years is not only incredible, I'd even go as far as say that the learning of bash makes you more aware of general weirdnesses whenever you attempt to use similar patterns in your own programming. CSV needs quotes, SQL needs quotes. Streaming data and delimiting it correctly isn't just a bash "problem domain". It's pretty much universal, really. For a recent example of a related problem: https://bugs.chromium.org/p/chromium/issues/detail?id=533361 https://bugs.chromium.org/p/chromium/issues/detail?id=533361
- h1d 8y agoAbsolutely agree. As fish site (jokingly) states, it was for the 90's, perhaps it's time we want one for the 20's next.