Bash script 'starts with'


Conditionals in double-brackets support wildcard matching!

[[ $VAR == start* ]]

The absense of double quotes around the start* is important: otherwise it will look for a literal *.

Date: 2021-06-26

Tags:  bash

Share: