Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA
Path: utzoo!watmath!clyde!burl!ulysses!allegra!bellcore!decvax!genrad!panda!talcott!harvard!seismo!brl-tgr!gwyn
From: gwyn@brl-tgr.ARPA (Doug Gwyn )
Newsgroups: net.unix
Subject: Re: why doesn't this shell program work
Message-ID: <8889@brl-tgr.ARPA>
Date: Sun, 3-Mar-85 15:33:12 EST
Article-I.D.: brl-tgr.8889
Posted: Sun Mar  3 15:33:12 1985
Date-Received: Wed, 6-Mar-85 02:40:39 EST
References: <2147@drutx.UUCP>
Organization: Ballistic Research Lab
Lines: 8

> for ...
> do
> 	variable=some
> done | ...
> echo $variable

The problem is that `variable' is being set in a forked subshell.
I don't know of any simple way around this.