try:
--
#!/usr/bin/perl

$date = `date +%y%m%e`;
$backup_dest = "/backup/home/" . "$date" . "-monthly";
$archive_dest = "/backup/home/archives/" . "$date" . "-monthly";
$backup_target = "/home/";
$level = '0';

$cmd = "dump -$level -u -A $archive_dest -f $backup_dest -j 9
$backup_target";

system ("$cmd") or die "command failed: $?";

-----Original Message-----
From: Mat Harris [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 12:30 PM
To: [EMAIL PROTECTED]
Subject: system command interraction


i am writing a perl script to run as a cron job and backup my files using
dump.

i have defined vars containing stuff like backup target, level of backup 
and so on.

I want to issue the command to the command line, including the values of 
these vars. I have tried backticking and the system('command here') but 
they just send the vars as empty strings.

i have attached the script

Matthew Harrison
Internet/Network Services Administrator
www.genestate.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to