Date: Sat, 28 Sep 2002 22:56:27 +0200 (CEST) From: Oliver Fromme <olli@secnetix.de> To: freebsd-questions@FreeBSD.ORG Subject: Re: Bourne shell redirection of STDOUT Message-ID: <200209282056.g8SKuRWw097543@lurza.secnetix.de> In-Reply-To: <5.1.0.14.0.20020928170713.00bcc758@mail.lusidor.nu>
index | next in thread | previous in thread | raw e-mail
Jimmy Lantz <jimmy.lantz@lusidor.com> wrote:
> 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`
Nice example of abuse of cat. :-)
#!/bin/sh -
DIALOG=${DIALOG=/usr/bin/dialog}
myvar=$($DIALOG --inputbox "Hitme" 8 40 2>&1 >$(tty))
Regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.
"All that we see or seem is just a dream within a dream" (E. A. Poe)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209282056.g8SKuRWw097543>
