Variables in scripts
Jim
jkipp5 at comcast.net
Fri Oct 8 16:18:31 UTC 2004
>
> I have a simple script:
>
> #!/bin/sh
>
******
change=0 #should be changed=0
*******
>
> while [ $changed -eq 0 ];
> do
*******
> changed=1 #should be $changed=0
*******
> echo $changed
> done
>
> echo $changed
> exit
>
> When I come to the last echo $changed, it's back to 0. Any
> idea why that is? This works find on Solaris???
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.772 / Virus Database: 519 - Release Date: 10/1/2004
More information about the redhat-list
mailing list