Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Sep 2002 04:25:14 -0400
From:      parv <parv_fm@emailgroups.net>
To:        Jimmy Lantz <jimmy.lantz@lusidor.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Bourne shell redirection of STDOUT
Message-ID:  <20020929082514.GA472@moo.holy.cow>
In-Reply-To: <5.1.0.14.0.20020928170713.00bcc758@mail.lusidor.nu>
References:  <5.1.0.14.0.20020928170713.00bcc758@mail.lusidor.nu>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020929082514.GA472>