Bash If Statements: Beginner to Advanced - DEV Community - 0 views
-
"[" is a command. It's actually syntactic sugar for the built-in command test which checks and compares its arguments. The "]" is actually an argument to the [ command that tells it to stop checking for arguments!
-
why > and < get weird inside single square brackets -- Bash actually thinks you're trying to do an input or output redirect inside a command!
-
the [[ double square brackets ]] and (( double parens )) are not exactly commands. They're actually Bash language keywords, which is what makes them behave a little more predictably.
- ...8 more annotations...