

3·
1 day agoMy most recent Bash mistake was misusing test -n and test -z. In Amber, I can just use something == “” or len(something) == 0
test -n can be [ "$something" ] and test -z can be [ "$something" = "" ]
And this applies to posix shell, not just bash.

[ "$age" \< 18 ] && { echo "I'm not an adult yet" } || { echo "I'm an adult" }if you want to be using braces in if statements lol