Changeset 2956
- Timestamp:
- 07/23/10 15:58:21
- Files:
-
- trunk/util/massageContacts.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/util/massageContacts.sh
r2949 r2956 1 1 #! /bin/bash -f 2 2 3 inputFile=MimisContacts.txt 3 rejectList=("Davidr*n Taylor" unnamed) 4 inputFile=$1 5 #inputFile=MimisContacts.txt 4 6 tmpFile=/tmp/MimisContactsMassaged$$.txt 5 7 # the resulting file is pumped out via stdout 6 8 7 sed '/ADR;TYPE=WORK:;;;;;;$/d' $inputFile | sed '/ADR;TYPE=HOME:;;;;;;$/d' | sed '/ADR;TYPE=X-ORACLE-OTHER:;;;;;;$/d' | sed 's/VERSION:3.0$/VERSION:4.0/' > $tmpFile 9 sed -e '/ADR;TYPE=WORK:;;;;;;$/d' -e 's/ 10 $//' -e '/ADR;TYPE=HOME:;;;;;;$/d' -e '/ADR;TYPE=X-ORACLE-OTHER:;;;;;;$/d' -e 's/VERSION:3.0$/VERSION:4.0/' $inputFile > $tmpFile 8 11 9 12 … … 37 40 # echo out the begin line 38 41 echo $beginLine 39 if [ x"$fnLine" == x ]; then 42 if [ x"$fnLine" = x ]; then 43 # skip over the rejects 44 for x in $rejectList; do 45 if [ `grep "$x" $fnLine` ] ; then 46 continue 47 fi 48 done 40 49 # mock up an FN and spit it out 41 50 if [ "$nLine" != "N:;;;;" ]; then
