[102052] in RedHat Linux List

home help back first fref pref prev next nref lref last post

RE: Command line help

daemon@ATHENA.MIT.EDU (Mike A. Lewis, CNE)
Tue Dec 1 07:00:43 1998

From: "Mike A. Lewis, CNE" <cajun@cajuninc.com>
To: "'redhat-list@redhat.com'" <redhat-list@redhat.com>
Date: Tue, 1 Dec 1998 04:00:12 -0800 
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com


Cool !  Thanks {again} for the help Charles.  I'll give it a whirl.

Mike

-----Original Message-----
From:	Charles Galpin [mailto:cgalpin@lighthouse-software.com]
Sent:	Tuesday, December 01, 1998 3:56 AM
To:	Mike A. Lewis, CNE
Subject:	RE: Command line help

===== Original Message from "Mike A. Lewis, CNE" <redhat-list@redhat.com> at

12/01/98 5:50 am
>I'm trying to setup a cron job to keep tabs on the mailq on one of my
>machines.  What I'm wanting is something along the lines of:
>
>#date ; mailq | head -1 >> /filename
>
>problem is, the above command creates two lines, one with the date, the
>second with the number of messages in the queue.  I'd like for the same
>information to be present, however on line line.
>
>Is there a way to do this ?
>
do something liek the following in a script

[cgalpin@pooh cgalpin]$ x=`date`
[cgalpin@pooh cgalpin]$ y=`mailq | head -1`
[cgalpin@pooh cgalpin]$ echo "$x $y"
Tue Dec  1 06:43:59 EST 1998 Mail queue is empty
[cgalpin@pooh cgalpin]$

>TIA,
>Mike

welcome

-- Charles Galpin  <cgalpin@lighthouse-software.com>


-- 
  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.


-- 
  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.


home help back first fref pref prev next nref lref last post