From owner-freebsd-questions Sun Sep 29 1:23:34 2002 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 97F8B37B401 for ; Sun, 29 Sep 2002 01:23:33 -0700 (PDT) Received: from harrier.mail.pas.earthlink.net (harrier.mail.pas.earthlink.net [207.217.120.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2EA8643E81 for ; Sun, 29 Sep 2002 01:23:33 -0700 (PDT) (envelope-from parv_fm@mailsent.net) Received: from sdn-ap-007dcwashp0322.dialsprint.net ([63.188.65.68] helo=moo.holy.cow) by harrier.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17vZMR-0007lK-00; Sun, 29 Sep 2002 01:23:32 -0700 Received: by moo.holy.cow (Postfix, from userid 1001) id 52658B389; Sun, 29 Sep 2002 04:25:14 -0400 (EDT) Date: Sun, 29 Sep 2002 04:25:14 -0400 From: parv To: Jimmy Lantz Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Bourne shell redirection of STDOUT Message-ID: <20020929082514.GA472@moo.holy.cow> Mail-Followup-To: Jimmy Lantz , freebsd-questions@FreeBSD.ORG References: <5.1.0.14.0.20020928170713.00bcc758@mail.lusidor.nu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.1.0.14.0.20020928170713.00bcc758@mail.lusidor.nu> 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 in message <5.1.0.14.0.20020928170713.00bcc758@mail.lusidor.nu>, wrote Jimmy Lantz thusly... > > I wonder if anyone know a way to redirect the STDOUT directly to a > variabel in a shellscript w/o using tempfile. > > I know I can use a tempfile but I'm looking for a way to avoid > using a file. you could use pipe (fifo) and/or, in bash2 & ksh93, arrays. a pipe is created by mkfifo(1); fill an array in a while loop. (yeah i know, that doesn't answer your question of not using a file in the bourne shell.) - parv -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message