There are quite a few differences, but here are some that are important to me:
!=perform pattern matching, so the right-hand side can be a glob pattern
!~perform regular expression matching. Captured groups are stored in the
- boolean operators
- no word splitting, so it's not strictly necessary to quote your variables.
[[ is understood by KornShell, Zsh and BASH (e.g. 2.03), but not by other POSIX shell implementations (like posh, yash or dash) or the BourneShell .