PrepAway - Latest Free Exam Questions & Answers

Which one of the statements is true?

Refer to the UNIX shell script below. Which one of the statements is true?
dir=/var/adm/CSCOpx/files/rme/dcma/devfiles
log=/tmp/removeDcmaFiles.log
echo “Starting removeDcmaFiles cron job `date`” >> $log
for i in `ls $dir`; do
 length=`ls -lrt $dir/$i/PRIMARY/RUNNING/ | wc -l`
 h=`expr $length – 3`
 for j in `ls -rt $dir/$i/PRIMARY/RUNNING/ | head -$h`;do
ÂÂ echo “rm -rf $dir/$i/PRIMARY/RUNNING/$j” >> $log

ÂÂ rm -rf $dir/$i/PRIMARY/RUNNING/$j
 done
done

PrepAway - Latest Free Exam Questions & Answers

A.
The following will be printed to the screen when the script is executed: Starting
removeDcmaFiles cron job `date`

B.
The following will be printed to the screen when the script is executed, but `date` will be
replaced by the actual date as known by the operating system: Starting removeDcmaFiles cron job
`date`

C.
The following will be printed to the screen multiple times: rm -rf $dir/$i/PRIMARY/RUNNING/$j

D.
Nothing will be printed to the screen if the script executes without error.


Leave a Reply