What does this do in bash: [@]?

Colin Watson cjwatson at ubuntu.com
Sat Jul 30 11:16:16 UTC 2022


On Sat, Jul 30, 2022 at 10:19:19AM +0100, Peter Flynn wrote:
> On 30/07/2022 00:41, Colin Watson wrote:
> > This sort of thing is generally much easier in Python,
> 
> It's actually much easier in pretty much anything except the shell :-)

Quite!  About the only virtue of the POSIX shell (along with its
relatives, e.g. bash) is that it has a very concise syntax for the
common case of running commands and piping their output to each other.
Beyond that, while it _can_ be used for programming and far too many of
the minutiae of how to do so live rent-free in my head, it's perhaps the
worst-designed language for that purpose that I use routinely.  I
heartily recommend that shell programmers use basically anything else if
at all possible.

I keep meaning to switch to something like https://fishshell.com/ for
interactive use, which seems to have a much more reasonable design.  But
inertia is a hell of a drug, and also I spend a fair bit of time using
computers where I'm not root so I'm not going to be able to get away
from the POSIX shell entirely.

-- 
Colin Watson (he/him)                              [cjwatson at ubuntu.com]




More information about the ubuntu-users mailing list