Unix Shell - Shell script problem

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > November 2005 > Shell script problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Shell script problem
Clemenza

2005-11-28, 6:04 pm

Hello,

I have a script below but it doesn't print any text. Does anybody has an
idea what can be the problem?

Thanks!

#!/bin/ksh
X=123
if [[ $X = +([0?]) ]]; then
print "$X is a number"
fi
Janis Papanagnou

2005-11-28, 6:04 pm

Clemenza wrote:
> Hello,
>
> I have a script below but it doesn't print any text. Does anybody has an
> idea what can be the problem?
>
> Thanks!
>
> #!/bin/ksh
> X=123
> if [[ $X = +([0?]) ]]; then
> print "$X is a number"
> fi


X=123
if [[ $X = +([0-9]) ]]; then
print "$X is a number"
fi


Janis
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com