Mark Post wrote:
On 9/23/2008 at  3:29 PM, in message
<[EMAIL PROTECTED]>, "Edmund R. MacKenty"
<[EMAIL PROTECTED]> wrote:
-snip-
vmstat 10 86040 | while read line; do echo "$(date) $line"; done > vmstat.out

Or, if you just want a timestamp every so many lines of output (keeping in mind 
that the first line of each set will be the average since the last reboot):

for ((i=1; i=i+1 ; i<100))
  do echo
       date
       vmstat 10 30
  done > vmstat.output



Or date then report
(date +%Y-%m-%d.%H%M;vmstat 10 86040 ) > vmstat-$(date +%Y-%m-%d.%H%M).out

Or mail it 1
vmstat 10 86040 | mail -s Report [EMAIL PROTECTED]
The date's in the email.
or mail it 2
(echo -e 'Subject: report\nTo: [EMAIL PROTECTED]:
[EMAIL PROTECTED]';vmstat 10 86040 )
 | sendmail -t

That's all one line. Hopefully, I have apostrophes and parentheses in
all the right places.

The second example allows control over email headers. Be sure there's a
blank line after the last header, but not before it.



--

Cheers
John

-- spambait
[EMAIL PROTECTED]  [EMAIL PROTECTED]
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to