Re: Variables in scripts

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

 






probably because

"change=0" should be

"changed=0"


Jason Alburger
609-485-7225
HID/NAS/LAN Engineer
Joseph Sheairs Associates, Inc.
FAA/AOS-330


                                                                                                                                         
                      "Brian McGrew"                                                                                                     
                      <Brian@doubledimens        To:       <redhat-list@xxxxxxxxxx>                                                      
                      ion.com>                   cc:                                                                                     
                      Sent by:                   Subject:  Variables in scripts                                                          
                      redhat-list-bounces                                                                                                
                      @redhat.com                                                                                                        
                                                                                                                                         
                                                                                                                                         
                      10/08/2004 11:38 AM                                                                                                
                      Please respond to                                                                                                  
                      General Red Hat                                                                                                    
                      Linux discussion                                                                                                   
                      list                                                                                                               
                                                                                                                                         
                                                                                                                                         




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



-- 
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