From owner-freebsd-bugs Wed Jan 10 8:40:21 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 414C737B699 for ; Wed, 10 Jan 2001 08:40:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f0AGe1l60151; Wed, 10 Jan 2001 08:40:01 -0800 (PST) (envelope-from gnats) Received: from mail.af.airnet.ne.jp (mail.af.airnet.ne.jp [210.159.66.49]) by hub.freebsd.org (Postfix) with ESMTP id C63AB37B400 for ; Wed, 10 Jan 2001 08:34:36 -0800 (PST) Received: from mail.ryu16.com (tok318.airnet.ne.jp [210.159.89.62]) by mail.af.airnet.ne.jp (8.8.8/3.6W/06/13/98-AF.AIRNET.NE.JP) with ESMTP id BAA109788 for ; Thu, 11 Jan 2001 01:34:34 +0900 Received: (from imura@localhost) by mail.ryu16.com (8.11.1/8.11.1) id f0AGWmU72130; Thu, 11 Jan 2001 01:32:48 +0900 (JST) (envelope-from imura) Message-Id: <200101101634.BAA109788@mail.af.airnet.ne.jp> Date: Thu, 11 Jan 2001 01:32:48 +0900 (JST) From: imura@af.airnet.ne.jp To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/24228: /bin/sh problem : variable after pipeline won't be set Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 24228 >Category: bin >Synopsis: when using /bin/sh, setting variable after pipeline won't work >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jan 10 08:40:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Ryuichiro Imura >Release: FreeBSD 4.2-STABLE i386 >Organization: >Environment: FreeBSD 4.2-STABLE >Description: When using /bin/sh, setting variables after "|" (in other words, I mean setting variables in a pipeline sequence), will be ignored out of the pipeline sequence. If it is a definition of /bin/sh, it's ok, I'm sorry, otherwise I think it should be fixed. >How-To-Repeat: write a simple shell script like this: -----------starts here---------- #/bin/sh cat FILE | while read line ; do if [ $line = foo ]; then variable=bar fi echo $variable <---- this will be printed done echo $variable <---- this will NOT be printed -----------ends here------------ >Fix: Sorry, this is only a information of my problem. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message