Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Apr 1997 04:14:40 -0800 (AKDT)
From:      Steve Howe <un_x@anchorage.net>
To:        freebsd-questions <questions@freebsd.org>
Subject:   bug?
Message-ID:  <Pine.BSF.3.95q.970425040839.15853F-100000@aak.anchorage.net>

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

i've had some buggy problems with sh, and think i narrowed one down
(2.2.1) - invoke with an argument ...

# this will not echo "goodbye".
while [ $1 ]; do xxx=goodbye!; shift; done | cat; echo $xxx

# this will ...
while [ $1 ]; do xxx=goodbye!; shift; done;       echo $xxx

what's going on here?  pipes have been destroying my variables ...
------------------------------------------------------------------------------
 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.970425040839.15853F-100000>