From owner-freebsd-hackers Fri May 23 18:40:28 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id SAA29475 for hackers-outgoing; Fri, 23 May 1997 18:40:28 -0700 (PDT) Received: from iceberg.anchorage.net. (root@iceberg.anchorage.net [207.14.72.150]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id SAA29470 for ; Fri, 23 May 1997 18:40:23 -0700 (PDT) Received: from aak.anchorage.net (ai-133 [207.14.72.133]) by iceberg.anchorage.net. (8.6.11/8.7.3) with SMTP id QAA16247 for ; Fri, 23 May 1997 16:37:31 -0800 Date: Fri, 23 May 1997 17:19:30 -0800 (AKDT) From: Steve Howe X-Sender: abc@aak.anchorage.net To: freebsd-hackers Subject: pipelines Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk #!/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 -------------------------------------------------------------------------