Changeset 2956

Show
Ignore:
Timestamp:
07/23/10 15:58:21
Author:
bleibson
Message:

small improvements

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/util/massageContacts.sh

    r2949 r2956  
    11#! /bin/bash -f 
    22 
    3 inputFile=MimisContacts.txt 
     3rejectList=("Davidr*n Taylor" unnamed) 
     4inputFile=$1 
     5#inputFile=MimisContacts.txt 
    46tmpFile=/tmp/MimisContactsMassaged$$.txt 
    57# the resulting file is pumped out via stdout 
    68 
    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 
     9sed -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 
    811 
    912 
     
    3740       # echo out the begin line 
    3841       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 
    4049          # mock up an FN and spit it out 
    4150          if [ "$nLine" != "N:;;;;" ]; then