This release fixes several outstanding bugs in bash-4.4 and introduces several new features. The most significant bug fixes are an overhaul of hownameref variables resolve and a number of potential out-of-bounds memory errors discovered via fuzzing. There are a number of changes to the expansion of $@ and $* in various contexts where word splitting is not performed to conform to a Posix standard interpretation, and additional changes to resolve corner cases for Posix conformance.
The most notable new features are several new shell variables: BASH_ARGV0, EPOCHSECONDS, and EPOCHREALTIME. The ‘history’ builtin can remove ranges of history entries and understands negative arguments as offsets from the end of the history list. There is an option to allow local variables to inherit the value of a variable with the same name at a preceding scope. There is a new shell option that, when enabled, causes the shell to attempt to expand associative array subscripts only once (this is an issue when they are used in arithmetic expressions). The ‘globasciiranges’ shell option is now enabled by default; it can be set to off by default at configuration time.
Any new shells out there? Bash is not offensive and widely used. Zsh isn’t bad either. But there used to be very ambitious hobby projects to build new and better shells. Any one know of any recent ones?
And for trolls, powershell doesn’t count. Its not niche. maybe one day for lols I’ll enable it on linux and see how good/bad that might be.
fish shell is absolutely awesome. I can’t imagine using any other interactive shell now. You can probably get Bash to do most of the same things but fish does it right by default.
Soulbender,
I’ve been using bash/dash…but with so many recommendations, I’ll have to give fish a shot! (Is anyone willing to write an article for it?)
https://fishshell.com/docs/current/tutorial.html
The official tutorial is here:
https://fishshell.com/docs/current/tutorial.html
OK, I know I may get lots of information from it by asking the “Great Internet Oracle” but, many times, asking someone that really uses the thing gives good insights and highlights, what is in it that makes learning one more tool really worth?
(heavy bash user here)
“learning” is a big word, fish is meant to be easy
use tab, use arrow keys
It’s different enough from bash/sh that you have to re-learn a lot of little things, judging from the tutorial you linked to in another comment (thanks for the link, though!).
I think the thing is, at least for me, that it wasn’t much to learn. I guess this was helped by me not being all that invested in bash as an interactive shell to begin with. As I said, most of the things I appreciate can most likely be done in Bash but I could never be arsed to do it.
I like having themes and extensions only a “fisher” command away.
My main dislike of fish is it doesn’t understand && and ||, which heavily breaks my workflow.
I don’t use it on my worksation but I administer several virtual machines for our customers (web hosting company) and some of those VMs use fish; those invariably fail my commands and I have to intervene manually.
Now, since you’re a fish user, let me ask you: do you know of a sh-compatibility-mode for fish?
Thanks!
Mmhh, I see in the tutorial:
“Combiners (And, Or, Not)
fish supports the familiar && and || to combine commands, and ! to negate them:
> ./configure && make && sudo make install”
But it doesn’t work for me. Maybe an old version? Weird…
Maybe I also have an old version because “&&” and “||” does not work for me either.
However, this is not something that bothers me (as is evident in that I haven’t noticed until now) since I rarely run complex interactive commands and all my scripts are using “/bin/sh”.
and indeed, this is new in 3.0.
https://itsfoss.com/fish-shell-release/
Thanks @Soulbender for the info (sorry, I can’t reply to your comments for some reason)
For interactive work fish (with oh my fish). For scripting bash (or dash).
Another happy fish user here. Using it on a daily basis. And yes bash for scripting. I don’t bother with other shells any more, fish is only a pacman -S fish away and indeed all defaults are (mostly) just right.
Powershell is out there. Ducking…
https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-6
Personally, have only used it on Windows.
But what’s the point though? I can see that it could be useful for remotely managing Windows machines but other than that? Like, why?
Why? Yes, why? Why breathe? Why ask why?
I couldn’t remember at the moment but I finally found the new shell I read about a few weeks ago, sorry it took me so long 🙂
http://www.oilshell.org/
Hope you like it!
I’m a Linux user, but not a sysadmin, so please someone enlighten me: isn’t the ubiquity and portability of the shell one of its biggest strengths? If you start using helpful but exotic non-standard extensions, doesn’t that just leave you likely to suffer problems if you try to run your scripts somewhere else, which is a big disincentive to using anything that’s not bash compatible?
I’m asking because I’m curious about using other shells, but I can see it causing problems down the line when I pitch up on another machine and hit incompatibilities.
If you write your scripts for ‘/bin/sh’ (the portable POSIX shell) this is not a problem and it’s what you should do anyway.
Bash scripts are not standard since Bash is not a POSIX shell.
So then you wouldn’t use any of the extensions in scripts, only when tapping away manually? Some things, like the local variable value inheritance described in the story summary, look like they’d be more useful for scripts.
That depends on the target audience of your scripts.
If it’s just you and a bunch of your colleagues on one particular distro family, you can use whatever shell fits your needs and is installed.
If you manage 1000s of vms from various clients, then it pays off to stick to the basics.
Not for sysadmin tasks, no. I keep those scripts as simple as possible and use other tools and languages for more complex tasks.
Thanks @soulbender, @dsmoger for your perspectives. I experience this tension between using the latest new features and sticking to the lowest common denominator all over the place in computing (e.g. programming languages, desktop environments, web standards), and it seems particularly acute here. So it’s interesting to hear how you approach it.