On Sat, Nov 10, 2007 at 01:46:33PM +0100, Penguin Lover Alex Schuster squawked: > [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
Thanks for the suggestions. I'll try them out on my test box when I get home. W -- What is the meaning of Life? To search for truth and beauty. To ask questions. To find the answer to this question To rigorously mathematically prove by epislon-delta treatment that this question has no answer. Proof? For all oranges greater than zero, there exists a banana such that for all fruits tastier than the banana, an orange sweeter than a banana implies the orange is yellow. So by the Jedi-Schwartz Inequality, all oranges are not orange. This leads to an obvious contradiction. It's too bad life is a departmental requirement, otherwise I'd P/D/F it. ~Phil Wei Sortir en Pantoufles: up 337 days, 13:43 -- [EMAIL PROTECTED] mailing list