[lug] In But Not Out Of Loop
Eric Kilfoil
ekilfoil at viawest.net
Sun May 27 04:40:22 MDT 2001
This seems to work for me:
C=0;
while [ $C -lt 100 ] ; do
echo $C;
C=$[$C+1];
done;
echo "C is $C"
Do you have a specific example?
Regards,
Eric Kilfoil
Sr. UNIX Systems Engineer
ViaWest Internet Services
On Sun, 27 May 2001, SoloCDM wrote:
> Every time I have a bash while, for or any other type of loop,
> with numbers processed and saved to a variable, the numbers are
> not in the variable outside the loop. Although, the numbers are
> capable of use and manipulation in the variable, for reassigning
> the variable or recall, anytime before the loop ends. How can the
> variable's content be available outside the loop?
>
> Note: When you reply to this message, please include the mailing
> list/newsgroup address and my email address in To:.
>
> *********************************************************************
> Signed,
> SoloCDM
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>
More information about the LUG
mailing list