Hi Olaf, I am working on your other recommendation. It won't be difficult as I need to update my scripts to use different sed command format. I would need 'd' flag instead of 'g' to tell the sed command that I want to remove the line. By the way, I used the following logic in my scripts:
1) Search for all all the files that have global_charset_info.h header file defined, then replace that line with empty line if charset_info is also declared in that file. If not, then check if charset.h is defined or not. If charset.h is declared in that file then replace global_charset_info.h with empty line. The script is: #!/bin/bash cd drizzle-fix-bug621859 i=0 for l in `egrep -ire "global_charset_info.h" * | cut -f1 -d':'` do echo "$i : $l" if grep "/charset_info.h" $l then echo "found" `sed -i 's/global_charset_info.h//g' $l` else echo "NOT FOUND" if grep "/charset.h" $l then `sed -i 's/global_charset_info.h//g' $l` fi fi i=`expr $i + 1` done 2) In 2nd step, I search for all the files that have charset_info.h header file, then replace that line with empty line with charset.h is already there in that file otherwise replace charset_info.h with charset.h. The script for this is: #!/bin/bash cd drizzle-fix-bug621859 i=0 for l in `egrep -ire "charset_info.h" * | cut -f1 -d':'` do echo "$i : $l" if grep "/charset.h" $l then echo "found" `sed -i 's/charset_info.h//g' $l` else echo "NOT FOUND" `sed -i 's/charset_info.h/charset.h/g' $l` fi i=`expr $i + 1` done All I need to do now is to use 'd' flag in sed commad instead of 'g' so that sed removes the line instead of putting empty line. I will take the fresh trunk code and re run my scripts on it. Thanks for the suggestions. Umair Muhammad Electrical Engineering Master Student, Specialization in Wireless Systems, School of Electrical Engineering, Royal Institute of Technology (KTH), SE 100-44 Stockholm, SWEDEN. Email: [email protected] Cell: +46 764 097 574 _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

