Conditionals in BashEdit

  • [: alias for the test command, is POSIX and portable, supported by many shells
  • [[: a language keyword, supported by Bash/Zsh, additional features (eg. not necessary to quote variables etc)
  • if: naked if construct can be used to check if commands complete successfully (eg if ! some_command; then ...; fi)

See also