this post was submitted on 02 Oct 2023
1751 points (98.0% liked)
Programmer Humor
32412 readers
676 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I believe the reason is that bash is backwards compatible with sh and sh only has [ ], not [[ ]]
[
is a binary (sometimes a symlink) in/usr/bin
. It's/usr/bin/[
๐คSolution: fuck backwards compatibility and use fish
Fish might be good for interactivity, but in terms of scripting, just go straight to python. It's not worth it.
Fish is starting to get more POSIX compliant as of late, the error redirect is no longer
^ /dev/null
but2>/dev/null