The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
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 11-25-2008
asulli01 asulli01 is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 6
Hi.
That worked - thanks.

My problem now is that everytime it goes through the loop it adds a line, which is ok if there is output. My problem is that i am now getting 3 to 4 blank lines so i now need to put an if statement to say if a blank line already exists don't add another.

Do you know how to do that?

CODE:
SUBDIR_LIST=`ls -d fmr*`
for DIR in `ls -d fmr*`; do
/usr/atria/bin/cleartool findmerge $DIR -fver .../strutsplus-2.0_bos/LATEST -print >> /home/a442592/merge_results1.txt
echo >> /home/a442592/merge_results1.txt "\n"
done
cat /home/a442592/merge_results1.txt | sed 's/Needs Merge//g' | sed 's/"//g' |cut -d[ -f1 > /home/a442592/merge_results2.txt


Thanks
Angela