"Doug Ritschel" <ritschel@optonline.net> writes:
> i=0
> echo "this is a test" | while read line; do
> i = `expr $i + 1`
> done
> echo $i
The while loop is run in a subshell and it has it's own local
variables so changing them won't change the value of oryginal
variable.
In fact
AFAIK the question was answered in FAQ.
--
Best regards, _ _
.o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +--<mina86*tlen.pl>--<jid:mina86*jabber.org>--ooO--(_)--Ooo--