Please be sure to note that this is a very simple example with absolutely no error checking. You should also check out the man pages for additional requirements when using ufsdump (file systems should be inactive, run in single user mode, etc.). A more robust solution using cshell script and Perl (with error checking) can be found here. HTH.#! /usr/bin/csh echo -n "** New Backup Job" >> /home/root/tape.log echo -n "** Rewinding tape . . . " >> /home/root/tape.log mt -f /dev/rmt/0 rew echo "**" >> /home/root/tape.log echo "** TAPE #1 Backup begins ("`date '+%Y/%m/%d %H:%M'`") **" >> / +home/root/tape.log echo " " >> /home/root/tape.log echo " Backing up -> /root" >> /home/root/tape.log ufsdump 0uf /dev/rmt/0n /dev/md/dsk/d20 >> & /home/root/tape.log echo " Root finished backing up ("`date '+%Y/%m/%d %H:%M'`")" >> /h +ome/root/tape.log echo -n "** Rewinding/Unloading tape . . . " >> /home/root/tape.log mt -f /dev/rmt/0 rewoffl
--Jim
In reply to Re: System Calls with backticks
by jlongino
in thread System Calls with backticks
by Mac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |