Hi,
I've got a Bourne .sh script that has a while do loop. Pseudo code as follows:
x=0
while x<10
do
echo x
x=x+1
done
echo "last value of x is $x"
The last echo statement returns 0. Is there a way to get the value of x from the last invocation of the while loop i.e x=9???
I've got a Bourne .sh script that has a while do loop. Pseudo code as follows:
x=0
while x<10
do
echo x
x=x+1
done
echo "last value of x is $x"
The last echo statement returns 0. Is there a way to get the value of x from the last invocation of the while loop i.e x=9???