Shell script problem

Shell script problem

Post by Clemenz » Wed, 30 Nov 2005 02:46:30



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

 
 
 

Shell script problem

Post by Janis Papanagno » Wed, 30 Nov 2005 02:59:41



> 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

 
 
 

1. Bash Shell Script Problems - Advice Needed

I've developed the following script which is meant to retrieve xml
data from a webpage, but i need any '&' to be changed to '&'. I'm
running this through an awk command but the output either never gets
written to the file (i.e. the file is created and is blank) or the
file never gets created.

any help would be greatly appreciated (for starters, is the awk
command correct??)

Thanks, Nick

************************************************************************

#!/bin/sh

# Get IT reseller XML news feed
(lynx -source http://www.cw360asp.com/News_Feeds/Extraction.asp?feed=Reseller_Break...)

# Change all of the & characters to read as &, this will stop the
XML parsing routines from falling over
awk '{ gsub(/&/, "&"); print $0 > "resellernews.xml"}'
resellernews.tmp

# destroy .tmp and .new files (we only need the .xml and .old files)
rm resellernews.tmp

2. Nis client

3. shell script problem

4. Wierdness with ncr0...

5. Help - UNIX Shell script problem

6. where o where might i find xagent???

7. running 'alias' from inside shell script problem

8. Pioneer 24X ATAPI

9. login shell script problem...

10. Unix Shell Script Problem

11. ppp -> shell script problems

12. Shell SCript problem

13. UNIX shell script problem