I am trying to pass a regex pattern as an argument to my script as follows:
bash script.sh '[a-z]*[0-9]*'
in my script I am assigning it to a variable
FIRST_ARG=$1
using echo $FIRST_ARG results in showing the files that match the expression, (i.e text1.txt, file2.txt.
I want the $1 to stay [a-z]*[0-9]*, I tried wrapping every variable with double quotes and without quotes and that didn't work, I also tried using single quotes, double quotes and no quotes on the command line argument and it doesn't work either.
Any ideas on how to fix this? Thank you.