From owner-freebsd-questions Sat Sep 28 9:53:51 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 E0D4637B401 for ; Sat, 28 Sep 2002 09:53:50 -0700 (PDT) Received: from bouba.alxhost.com (bouba.alxhost.com [66.96.220.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 742C543E65 for ; Sat, 28 Sep 2002 09:53:50 -0700 (PDT) (envelope-from jimmy.lantz@lusidor.com) Received: from [212.162.175.101] (helo=lusidor2002.lusidor.com) by bouba.alxhost.com with esmtp (Exim 3.36 #1) id 17vJMF-00051x-00 for freebsd-questions@FreeBSD.ORG; Sat, 28 Sep 2002 11:18:15 -0400 Message-Id: <5.1.0.14.0.20020928170713.00bcc758@mail.lusidor.nu> X-Sender: lusidor@mail.lusidor.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sat, 28 Sep 2002 17:20:39 +0200 To: freebsd-questions@FreeBSD.ORG From: Jimmy Lantz Subject: Bourne shell redirection of STDOUT Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bouba.alxhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [0 0] X-AntiAbuse: Sender Address Domain - lusidor.com 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 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