I have a requirement to compare the file contents in two different directories..
Dir One
Test.java
Abc.java
Dir two
Test.java
Abc.java
before comparing the files for differences, I would like to delete few lines in these files,
for example, these files have CVS repository information on the top
Source: $Source: /home/test/blah$
Module $abc$
can some one provide a script to delete these lines based on a given pattern in all the files in a directory.
Once those lines are deleted, I will use a dircmp command to perform the diff on the directories..
thanks
for F in `find . -type f`
do
cd `dirname $F`
FILE=`basenmae $F`
awk ' !/^Source:/ || !/^Module/ {print}' $FILE > ${FILE}_new
/bin/mv -f ${FILE}_new $FILE
done