I am trying to run simple code block. It gives error on fourth line as "syntax error near `$1'"
=~ means Matches Regular Expression
How should I use '$1' variable with this operator?
Here is my code:
if [[ $1 -gt 3 ]] && [[ $1 -lt 7 ]]
then
echo "$1 is between 3 and 7"
elif [[ $1 =~ "Jeff"]] || [[ $1 =~ "Roger" ]] || [[ $1 =~ "Brian" ]]
then
echo "$1 works in the Data Science Lab"
else
echo "You entered: $1, not what I was looking for.."
fi