From owner-freebsd-questions Sat Mar 23 2:58:47 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mta07-svc.ntlworld.com (mta07-svc.ntlworld.com [62.253.162.47]) by hub.freebsd.org (Postfix) with ESMTP id 224B537B400 for ; Sat, 23 Mar 2002 02:58:42 -0800 (PST) Received: from lungfish.ntlworld.com ([80.4.0.215]) by mta07-svc.ntlworld.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020323105841.NBEZ22101.mta07-svc.ntlworld.com@lungfish.ntlworld.com>; Sat, 23 Mar 2002 10:58:41 +0000 Received: from tuatara.goatsucker.org (tuatara.goatsucker.org [192.168.1.6]) by lungfish.ntlworld.com (8.11.6/8.11.3) with ESMTP id g2NAwfj03699; Sat, 23 Mar 2002 10:58:41 GMT (envelope-from scott@tuatara.goatsucker.org) Received: (from scott@localhost) by tuatara.goatsucker.org (8.11.6/8.11.6) id g2NAwem11126; Sat, 23 Mar 2002 10:58:40 GMT (envelope-from scott) Date: Sat, 23 Mar 2002 10:58:40 +0000 From: Scott Mitchell To: mmercer@nc.rr.com, mmercer@lboard.com Cc: Cliff Sarginson , freebsd-questions@FreeBSD.ORG Subject: Re: Bourne shell question: How to capture stdin and stdout from bourne shell script. Message-ID: <20020323105840.B278@fishballoon.dyndns.org> References: <3C9BF45E.BBEB5911@nc.rr.com> <20020323034432.GA9544@raggedclown.net> <3C9BFC12.F6C1C22C@nc.rr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C9BFC12.F6C1C22C@nc.rr.com>; from mmercer@nc.rr.com on Fri, Mar 22, 2002 at 10:52:50PM -0500 X-Operating-System: FreeBSD 4.5-STABLE i386 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Mar 22, 2002 at 10:52:50PM -0500, Michael E Mercer wrote: > Forgot to mention, I need this for solaris 8 platform. I already read the man > page for script > and it does not look like it supports the 'command' option that freebsd does. > > Oh well. > > Thanks > Michael > It looks like the Solaris /bin/sh knows about the exec < /some/file > /some/other/file trick. Just use this in your script, and all subsequent input/output will use the specified files. HTH, Scott -- =========================================================================== Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines" scott.mitchell@mail.com | 0xAA775B8B | -- Anon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message