Today in "things I hate about bash" I found out that it is syntactically meaningful to have a space between your square braces and the operands inside
-
Today in "things I hate about bash" I found out that it is syntactically meaningful to have a space between your square braces and the operands inside
if [["foo" != "bar"]]; then echo "yay"; fi
# error, executable "foo" not found.
if [[ "foo" != "bar" ]]; then echo "yay" fi
# yayI hate bash.
-
Today in "things I hate about bash" I found out that it is syntactically meaningful to have a space between your square braces and the operands inside
if [["foo" != "bar"]]; then echo "yay"; fi
# error, executable "foo" not found.
if [[ "foo" != "bar" ]]; then echo "yay" fi
# yayI hate bash.
@Foritus the only good reason to use it as a scripting language is because that’s the default shell almost everywhere ^^’
-
Today in "things I hate about bash" I found out that it is syntactically meaningful to have a space between your square braces and the operands inside
if [["foo" != "bar"]]; then echo "yay"; fi
# error, executable "foo" not found.
if [[ "foo" != "bar" ]]; then echo "yay" fi
# yayI hate bash.
@Foritus a language that deliberately makes conditionals as difficult as possible.
-
Today in "things I hate about bash" I found out that it is syntactically meaningful to have a space between your square braces and the operands inside
if [["foo" != "bar"]]; then echo "yay"; fi
# error, executable "foo" not found.
if [[ "foo" != "bar" ]]; then echo "yay" fi
# yayI hate bash.
@Foritus Yupp. I'm pretty sure I'm doing this one at least once for every if I write.

-
Today in "things I hate about bash" I found out that it is syntactically meaningful to have a space between your square braces and the operands inside
if [["foo" != "bar"]]; then echo "yay"; fi
# error, executable "foo" not found.
if [[ "foo" != "bar" ]]; then echo "yay" fi
# yayI hate bash.
@Foritus I think it goes back to bourne shell and [ foo = bar ] test "alias"