From owner-freebsd-questions@FreeBSD.ORG Fri Aug 12 02:35:43 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 57CA016A41F for ; Fri, 12 Aug 2005 02:35:43 +0000 (GMT) (envelope-from Qiang.Xu@fujixerox.com) Received: from mx21.fujixerox.co.jp (mx21.fujixerox.co.jp [192.26.96.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA75443D45 for ; Fri, 12 Aug 2005 02:35:42 +0000 (GMT) (envelope-from Qiang.Xu@fujixerox.com) Received: from isvw21.fujixerox.co.jp ([129.249.27.141]) by mx21.fujixerox.co.jp with ESMTP id j7C2ZGcJ000913; Fri, 12 Aug 2005 11:35:16 +0900 (JST) Received: from ms20.fujixerox.co.jp (localhost [127.0.0.1]) by isvw21.fujixerox.co.jp with ESMTP id j7C2ZFmB024283; Fri, 12 Aug 2005 11:35:15 +0900 (JST) Received: from sgpaphq-smtp01.fujixerox.com ([13.198.8.73]) by ms20.fujixerox.co.jp with ESMTP id j7BMLnIo022342; Fri, 12 Aug 2005 11:35:14 +0900 (JST) Received: from mailhost.sgp.fujixerox.com by sgpaphq-smtp01.fujixerox.com with ESMTP id 116204421123814101; Fri, 12 Aug 2005 10:35:01 +0800 Received: from localhost (localhost [127.0.0.1]) by localhost.sgp.fujixerox.com (Postfix) with SMTP id 9059E1D9A4; Fri, 12 Aug 2005 10:34:57 +0800 (SGT) Received: from sess.xssc.sgp.xerox.com (unknown [13.198.33.122]) by imss.sgp.fujixerox.com (Postfix) with ESMTP id 1148F1D9B1; Fri, 12 Aug 2005 10:34:47 +0800 (SGT) From: Xu Qiang To: Giorgos Keramidas , Xu Qiang Date: Fri, 12 Aug 2005 10:38:20 +0800 X-Sent-Folder-Path: Sent Items X-Mailer: Oracle Connector for Outlook 9.0.4 60130 (9.0.2711) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-Id: <20050812023447.1148F1D9B1@imss.sgp.fujixerox.com> Cc: dpk , freebsd-questions@freebsd.org Subject: RE: Help on bash script? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2005 02:35:43 -0000 Giorgos Keramidas wrote: > On 2005-08-12 10:16, Xu Qiang wrote: >> Btw, can we "export" a value in the sub-shell back to the parent? > = > Only through `backquote subtitution', as the child process cannot > affect the environment of the parent process. > = > value=3D`shell command` > value=3D$(shell command) Ah, yes, I mistakened it. The "export" mechanism is to preserve the value f= rom the parent to the child, not the other direction, as described in the b= ook "The Unix Programming Environment" by Brian Kernighan and Rob Pike. = Thanks, Xu Qiang