From owner-freebsd-hackers Mon Aug 26 11:48:48 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4FF1037B400 for ; Mon, 26 Aug 2002 11:48:45 -0700 (PDT) Received: from PIKES.panasas.com (gw2.panasas.com [65.194.124.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DAA443E86 for ; Mon, 26 Aug 2002 11:48:44 -0700 (PDT) (envelope-from rgrover@panasas.com) Received: from panasas.com ([172.17.132.191]) by PIKES.panasas.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id R18VRX0J; Mon, 26 Aug 2002 14:48:41 -0400 Message-ID: <3D6A77C7.50FFCE3@panasas.com> Date: Mon, 26 Aug 2002 11:47:35 -0700 From: Rohit Grover X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Antonio Inojal Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: piping to a script References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Antonio Inojal wrote: > > Hello, I am trying to pipe content from a C program into a shell script. > What I want to do is to pass the information coming from the C app, into > an environmental variable in the shell script: > > my_app | my_script . > > Say that my app spits out the date, ok? > I want that an env variable declared in my_script pick up the data being > piped and make that data its value. > If anyone knows how to do this, or if I have not explained myself right > please contact me. Thank You very much. $ ENV_VAR=`my_app` my_script PS: hackers is not the right forum for such questions. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message