Double Brackets [[
Pattern Matching
The double bracket command provides advanced features for string comparisons, pattern matching.
[[ expression ]]
Double brackets are a Bash implementation, and may not work with other shell types.
if [[ $USER == t* ]]
then
echo "hiya $USER"
else
echo "INTRUDER ALERT"
fi
No Comments