diff options
author | Dirk Engling <erdgeist@erdgeist.org> | 2015-05-16 13:41:38 +0200 |
---|---|---|
committer | Dirk Engling <erdgeist@erdgeist.org> | 2015-05-16 13:41:38 +0200 |
commit | 946465e80e38899fd1250a1ede7c4b9161651fcf (patch) | |
tree | e50d7e15fa4b5eaa53653c38cc05559e057af29e | |
parent | e8e067561f9f34d42cca9028373b1e036910d6f7 (diff) |
whitespaces
-rwxr-xr-x | makecolumns.sh | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/makecolumns.sh b/makecolumns.sh index 7b08a32..b128b46 100755 --- a/makecolumns.sh +++ b/makecolumns.sh | |||
@@ -115,48 +115,48 @@ handle_format_version_1() { | |||
115 | } | 115 | } |
116 | 116 | ||
117 | handle_format_version_2() { | 117 | handle_format_version_2() { |
118 | echo "Working on $1. Detected pre 02/1996 Telefonbuch version." | 118 | echo "Working on $1. Detected pre 02/1996 Telefonbuch version." |
119 | 119 | ||
120 | # Extract all CD's pkware compressed databases | 120 | # Extract all CD's pkware compressed databases |
121 | printf "Extracting 3 pkware databases ...\n" | 121 | printf "Extracting 3 pkware databases ...\n" |
122 | cd=1 | 122 | cd=1 |
123 | for database in `find "$1" -iname atb?dd00`; do | 123 | for database in `find "$1" -iname atb?dd00`; do |
124 | dir=`dirname ${database}` | 124 | dir=`dirname ${database}` |
125 | base=`basename ${database}` | 125 | base=`basename ${database}` |
126 | printf " %d/3 in %4s. Decompressing ... " ${cd} "$( basename ${dir} )" | 126 | printf " %d/3 in %4s. Decompressing ... " ${cd} "$( basename ${dir} )" |
127 | extract_version_2 "${database}" > ${base}.dump | 127 | extract_version_2 "${database}" > ${base}.dump |
128 | 128 | ||
129 | printf ", extracting ... " | 129 | printf ", extracting ... " |
130 | indexfile=$( find ${dir} -iname atb?di00 ) | 130 | indexfile=$( find ${dir} -iname atb?di00 ) |
131 | split_version_2 "${base}.dump" "${indexfile}" | 131 | split_version_2 "${base}.dump" "${indexfile}" |
132 | 132 | ||
133 | printf ", cleaning up ... " | 133 | printf ", cleaning up ... " |
134 | rm "${base}.dump" | 134 | rm "${base}.dump" |
135 | printf "done.\n" | ||
136 | cd=$((cd+1)) | ||
137 | done | ||
138 | |||
139 | mv 01_unknown 01_Flags | ||
140 | mv 16_unknown 02_Nachname | ||
141 | mv 07_unknown 03_Vorname | ||
142 | mv 14_unknown 04_Namenszusatz | ||
143 | mv 11_unknown 05_Adresszusatz | ||
144 | mv 12_unknown 06_Ortszusatz | ||
145 | mv 08_unknown 07_Strasse | ||
146 | mv 10_unknown 08_Hausnummer | ||
147 | mv 13_unknown 09_Fax_Verweise | ||
148 | mv 02_unknown 10_Postleitzahl | ||
149 | mv 15_unknown 11_Ort | ||
150 | mv 09_unknown 11_Ort_Gemeinde | ||
151 | mv 05_unknown 12_Vorwahl | ||
152 | mv 06_unknown 13_Rufnummer | ||
153 | |||
154 | # remove entries that are for searching only | ||
155 | rm 03_unknown 04_unknown | ||
156 | |||
157 | printf "Normalizing zusaetze ... " | ||
158 | lam 04_Namenszusatz 05_Adresszusatz | tr '\t' ' ' | sed -E s/' +'/' '/g > 04_Zusaetze | ||
135 | printf "done.\n" | 159 | printf "done.\n" |
136 | cd=$((cd+1)) | ||
137 | done | ||
138 | |||
139 | mv 01_unknown 01_Flags | ||
140 | mv 16_unknown 02_Nachname | ||
141 | mv 07_unknown 03_Vorname | ||
142 | mv 14_unknown 04_Namenszusatz | ||
143 | mv 11_unknown 05_Adresszusatz | ||
144 | mv 12_unknown 06_Ortszusatz | ||
145 | mv 08_unknown 07_Strasse | ||
146 | mv 10_unknown 08_Hausnummer | ||
147 | mv 13_unknown 09_Fax_Verweise | ||
148 | mv 02_unknown 10_Postleitzahl | ||
149 | mv 15_unknown 11_Ort | ||
150 | mv 09_unknown 11_Ort_Gemeinde | ||
151 | mv 05_unknown 12_Vorwahl | ||
152 | mv 06_unknown 13_Rufnummer | ||
153 | |||
154 | # remove entries that are for searching only | ||
155 | rm 03_unknown 04_unknown | ||
156 | |||
157 | printf "Normalizing zusaetze ... " | ||
158 | lam 04_Namenszusatz 05_Adresszusatz | tr '\t' ' ' | sed -E s/' +'/' '/g > 04_Zusaetze | ||
159 | printf "done.\n" | ||
160 | 160 | ||
161 | } | 161 | } |
162 | 162 | ||