[mrtg] Re: perl question, more or less
Tony Bourke
tonyb at globalcenter.net
Tue Jun 6 22:26:09 MEST 2000
Hi Paul,
For these purposes I used just sh, which could be incorporated into a
system(""); command in perl:
DATE=`date +%Y-%m-%d`
cp $HTDIR/switches/sw.2.2-day.gif $ADIR/total/total_$DATE.gif
This has worked out extremely well, producing a file along the lines of:
total_2000-04-04.gif
Tony
On Tue, 6 Jun 2000, Paul C. Williamson wrote:
> Hi everyone,
>
> This doesn't have much to do with mrtg, but there are some pretty good perl people on the list, so I figured I'd shoot this question out to the gallery...
>
> How do I create a filename with the date embedded into it? Right now, I have a script that runs each night and collects the top talkers (thanks Mark!) for the previous 34 hours. I added some stuff and it automatically creates a webpage for the information. I would like a perl statement or option that creates a file called "20000606in.html" (today's date plus in.html) instead of just "in.html". Any ideas? I am sure there's something out there to do this, I just haven't been able to find it.
>
> Thanks,
>
> Paul Williamson
> Manager of EMS
> M&T Bank Corporation
>
>
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subjectArchive http://www.ee.ethz.ch/~slist/mrtg
> FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
>
---------------- ------ -- --- -- - - - - - - ->
Tony Bourke tonyb at globalcenter.net
Insert Job Title Here
GlobalCenter, Inc. 917.305.7155
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
More information about the mrtg
mailing list