Re: [foxboro] NutCracker Shell (WinXP, V8.3) and the local/global variable problem

  • From: "Jeremy Milum" <jmilum@xxxxxxxxx>
  • To: foxboro@xxxxxxxxxxxxx
  • Date: Thu, 3 Jan 2008 11:07:57 -0600

vairables within a subshell lose their scope. you can rewrite your
script w/o the while and pipe like this:

----------------------------------
list="word1 word2"
for NAME in $list
do
    echo $NAME
    VAR=2        # this seems to be a local variable within the while loop
done
-----------------------------------

and that should work
 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             //www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts: