I'm sure some one has seen this before and hopefully there's a work-around.
houston:/admin/IrasDir # cat wtest
#!/bin/bash
#
myVar="Old Value"
echo "1: "$myVar
echo "New Value" | while read data ; do
myVar=$data
echo "2: "$myVar
done
echo "3: "$myVar
returns,
1: Old Value
2: New Value
3: Old Value
In otherwords, myVar gets changed inside the while loop, but doesn't retain
the value when the loop exits.
Any clues?
--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list