Dear Monks, Season's wishes. I am trying for a simple script which will: a) Take backup base directory and list of from command line. b) Create backup base directory and copy files into it Problem statement: 1) system ($CP, $srcfile, $dstfile) doesn't work.
if($file =~ m/\.txt$/i){ #backup to $BACKUP_BASE_DIR $dstDir = $BACKUP_BASE_DIR.$myDir; system("/bin/mkdir -p -m 755 $dstDir"); system(`/bin/cp -p $currentFile $dstDir`); print "$CP $currentFile $dstDir"; print "\n"; } else{}
In reply to Dynamic Backup script by Ojas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |