Re: pipe help
I do almost exactly this task using a small perl script:
#!/usr/local/bin/perl
`/bin/date`;
`traceroute imap.unc.edu`;
__END__
and have a crontab entry running the script >> /var/log/pinglog
at the appropriate times.
Hope this helps.
----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin@unc.edu - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA
On Fri, 26 Oct 2001, Hall Stevenson wrote:
> I think this should be simple...
>
> I want to run a command (traceroute) and have the date/time listed
> before the trace output. I'll do this multiple times and want to keep
> appending to the same file.
>
> The results will ideally look something like this:
>
> 'date/time'
> (trace results)
>
> 'date/time'
> (trace results)
>
> and so on...
>
>
> Thanks in advance
> Hall
>
>
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>
Reply to:
- References:
- pipe help
- From: Hall Stevenson <hallstevenson@mindspring.com>