Between backquotes you can use Perl Variables.
Try something like this:
$time = time(); #$time has now the current unixtime
`tar -czvf /var/tar-logs/file-$time.tgz /usr/local/etc/httpd/logs`
hope this helps,
cr
On Thu, 03 May 2001 16:29:56 -0700, Chris Bourne said:
> If someone will I need help with a simple problem. I need to basically
> place a command within command. For example if I was taring up some
> files and called the file file.tgz how would I place the current system
> date in between the file name and the .tgz
>
> EXAMPLE:
>
> #!/usr/bin/perl -w
>
> `tar -czvf /var/tar-logs/file-date.tgz /usr/local/etc/httpd/logs`
>
> I tried various combinations but I am a beginner and need help please.
> Thanks, [EMAIL PROTECTED]
>
>