[96801] in RedHat Linux List
Re: Scripting
daemon@ATHENA.MIT.EDU (Deryk Barker)
Thu Oct 29 12:30:52 1998
Date: Thu, 29 Oct 1998 08:59:30 -0800
From: Deryk Barker <dbarker@camosun.bc.ca>
To: redhat-list@redhat.com
In-Reply-To: <Pine.LNX.3.96.981029112540.3134A-100000@linuxtest.fellows.denison.edu>; from Linux User on Thu, Oct 29, 1998 at 11:30:09AM -0500
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com
Thus spake Linux User (linuxuser@linuxtest.fellows.denison.edu):
>
> How do I store a output to a variable,
>
> what I want to do is to get the output of
>
> $ grep alive /usr/local/bin/fpinger/rundata
>
> to a variable ($pingalive) so i can do
>
> $ mail -s $pingalive whoever@whereever.xyz
> (basically get the result of fping in the subject line)
$ pingalive=`grep alive /usr/local/bin/fpinger/rundata`
does it for me.
--
|Deryk Barker, Computer Science Dept. | Music does not have to be understood|
|Camosun College, Victoria, BC, Canada| It has to be listened to. |
|email: dbarker@camosun.bc.ca | |
|phone: +1 250 370 4452 | Hermann Scherchen. |
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com http://archive.redhat.com
To unsubscribe: mail redhat-list-request@redhat.com with
"unsubscribe" as the Subject.