Can anyone please help, I have an if statement in my Bash code that goes as is:
if [[ $1 == *.txt ]]; then
echo "It's a TXT file!!!"
fi
I set the shell code to executable by adding #!/bin/sh
, and doing chmod u+x main.sh,
but it still prints out the error:
./main.sh: 3: [[: not found
Any help is appreciated!