The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 04-23-2009
giannicello giannicello is offline
Registered User
  
 

Join Date: Sep 2001
Location: Phoenix
Posts: 169
You can also tackle it this way and fidget with space in your echo/print statement:


Code:
print "Header2 Header2 Header3 Header4,etc " > $TMP_FILE
print "------etc" >>$TMP_FILE
for i in `chkbck`
do
   f1=`echo $i | cut -d"_" -f3`
   f2=`$i | cut -d"/" -f6`
   f3=`egrep -i 'Starting backup*' $i`
   f4=`egrep -i 'Finished backup*' $i`

   if egrep -i 'exit status [^0]' $i
   then
      f5="Backup Failed"
   else
      f5="Backup Successful"
   fi
   print $f1 $f2 $f3 $f4 $f5 >> $TMP_FILE
done

Just a thought...