Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 May 1997 17:19:30 -0800 (AKDT)
From:      Steve Howe <un_x@anchorage.net>
To:        freebsd-hackers <hackers@freebsd.org>
Subject:   pipelines
Message-ID:  <Pine.BSF.3.95q.970523171443.13536A-100000@aak.anchorage.net>

next in thread | raw e-mail | index | archive | help

#!/bin/sh
# invoke with dummy args ...
while [ $1 ]; do t=$(($t + 1)); shift; done | cat; echo X$t


is there any way to find the value of a variable that is set in a pipe
... outside the pipe?  i wish i could echo "t"s value in the example
above, but exporting, etc, doesn't seem to help. 

please respond directly - i don't subscribe to hackers ...  thanks.
-------------------------------------------------------------------------
 Sleep: a sign a caffeine deprivation ... http://www.anchorage.net/~un_x
-------------------------------------------------------------------------




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970523171443.13536A-100000>