[EMAIL PROTECTED] writes: > I have the same problem and I was trying to solve it few weeks ago, > after almost two weeks of searching and compiling I substituted =~ with > expr: > > - orig use with ~= : > # if [[ "test" =~ ".*" ]]; then echo "ok"; fi > > - alternative use with expr : > # export TEST_VAR="test" > # if [[ ${#TEST_VAR} == `expr "${TEST_VAR}" : ".*"` ]]; then echo "ok"; > fi
Or like this: match=".*" if [[ "test" =~ $match ]]; then echo "ok"; fi Wonko -- [EMAIL PROTECTED] mailing list