Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Sep 2002 17:20:39 +0200
From:      Jimmy Lantz <jimmy.lantz@lusidor.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Bourne shell redirection of STDOUT
Message-ID:  <5.1.0.14.0.20020928170713.00bcc758@mail.lusidor.nu>

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

in other words

Does anyone have an alternative to this? I would like to be able to run 
this script read-only :
#!/bin/sh
DIALOG=${DIALOG=/usr/bin/dialog}
dialog --inputbox "Hitme" 8 40  \
  2> /tmp/tempfile
myvar=`cat /tmp/tempfile`

Tia
Jim.


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?5.1.0.14.0.20020928170713.00bcc758>