Variables in scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm asking this question here becuase what I have works on Solaris but not Redhat 7.3

I have a simple script:

#!/bin/sh

change=0

while [ $changed -eq 0 ];
do
	changed=1
	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???

-brian

Brian D. McGrew        { brian@xxxxxxxxxxxxxxxxxxx || brian@xxxxxxxxxxxxx }
---
> YOU!  Off my planet!

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux