Hi all,
How I could compare variable and regexp?
For example...
I am running the script ./aaa.sh -b [0-9]*
[0-9]* is variable $2 (second argument of script).
I would compare variables $a (generated from my cycle) and $2 as regexp.
I need from regular expression find file that satisfies this regexp.
I tried classic if [ "$a"="$2" ];... or if [ expr $a:$2 ]; ....but it isn't running ("Too many arguments")
Any ideas?