Andreas Kauffmann wrote:
>
> Hy everybody in the List!
Hello,
> I have a Problem writing a little perl application...
> Im a very newbie to programming and need your help :)
>
> The Problem is:
> I have a file "dev.txt" and I want to rename it once a day (with a cronjob) like
>"dev13092002.txt"
> So i need to rename it with a date variable.
> All I have at the moment is:
>
> #!/usr/bin/perl
> $d = `date`;
> $d = /pattern1(pattern2)/;
> sytem("cp test.txt test`$d`.txt");
>
> Does anyone of you know how to do that?
For something simple like this you don't really need a Perl program
# run five minutes after midnight, every day
5 0 * * * /bin/cp test.txt test`/bin/date +%d%m%Y`.txt
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]