Albin Jose@suppo.fi to Programmer Humor@lemmy.ml · 2 years agoDepression Is No Moresuppo.fiimagemessage-square120fedilinkarrow-up11.74Karrow-down136
arrow-up11.7Karrow-down1imageDepression Is No Moresuppo.fiAlbin Jose@suppo.fi to Programmer Humor@lemmy.ml · 2 years agomessage-square120fedilink
minus-squarehisbaan@lemm.eelinkfedilinkarrow-up10·2 years agoI believe the reason is that bash is backwards compatible with sh and sh only has [ ], not [[ ]]
minus-squarefloat@feddit.delinkfedilinkarrow-up6·2 years ago[ is a binary (sometimes a symlink) in /usr/bin. It’s /usr/bin/[ 🤓
minus-squareNumber358@lemmy.worldlinkfedilinkarrow-up5arrow-down1·2 years agoSolution: fuck backwards compatibility and use fish
minus-squaretwelvefloatinghands@lemmy.worldlinkfedilinkarrow-up8·2 years agoFish might be good for interactivity, but in terms of scripting, just go straight to python. It’s not worth it.
minus-squareAffine Connection@lemmy.worldlinkfedilinkEnglisharrow-up2·2 years ago[[ is not a POSIX shell feature.
deleted by creator
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.
[[ is not a POSIX shell feature.