Bash: Problems with pattern in conditional statements

isleg@altavista.com isleg@altavista.com
Fri Aug 18 15:10:00 GMT 2000


Hi,

Maybe I am doing something really stupid, but I can't find the solution !!!.

If I try to use a conditional statement as

if [ ABC = A* ] 
then
   echo Ok
else
   echo Error
fi

the result is 'Error' when I expect ok!
I have also tried
if [ "ABC" = "A*" ] 


Can I use patterns into conditional statements?
If I'm not wrong, I can do such kind of things in ksh.

Thanks a lot,

Isi,

_______________________________________
Isidoro Legido Martínez
isleg@altavista.com
Penitentienenstraat 53
3000 Leuven (Belgium)
Tel. : + 32 16 231806
DNS : isleg.dyndns.org
_______________________________________________________________________

Free Unlimited Internet Access! Try it now! 
http://www.zdnet.com/downloads/altavista/index.html

_______________________________________________________________________



More information about the Cygwin mailing list