summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <>2007-10-17 11:36:41 +0000
committererdgeist <>2007-10-17 11:36:41 +0000
commitcfc72d1e3bd2c9400fecc539bb4a13d5a6603fe3 (patch)
treeb79e22fc35e160552ecdde9fe14526808445219f
parentb2f288d217786ac2e02e86311496ace68f80eccd (diff)
Column maker
-rw-r--r--src/makecolumns.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/makecolumns.sh b/src/makecolumns.sh
new file mode 100644
index 0000000..d53b26b
--- /dev/null
+++ b/src/makecolumns.sh
@@ -0,0 +1,37 @@
1#!/bin/sh
2
3EL=`dirname $0`/el
4HO=`dirname $0`/hexout
5
6numfiles=`ls file_* | wc -l`
7
8for column in `jot - 0 11 1`; do
9 for file in `jot - ${column} ${numfiles} 11`; do
10 acton=`printf file_%05x ${file}`
11 if [ ${column} = 0 ]; then
12 ${HO} < ${acton} >> column_0;
13 else
14 tr '\0' '\n' < ${acton} >> column_${column};
15 fi
16 done;
17done
18
19mv column_0 01_Flags
20mv column_1 02_Nachname
21mv column_2 03_Vorname
22mv column_3 04_05_Namenszusatz_Addresszusatz
23mv column_4 09_Detail
24mv column_5 07_08_Strassenindex_Hausnummer
25mv column_6 12_Vorwahl
26mv column_7 10_Postleitzahl
27mv column_8 11_Ort
28mv column_9 13_Rufnummer
29mv column_10 14_15_Email_Webadresse
30
31[ -e streets ] && mv streets 99_Strassenname
32
33if [ -e 99_Strassenname ]; then
34 cut -f 1 07_08_Strassenindex_Hausnummer | ${EL} -0 99_Strassenname > 07_Strasse
35else
36 echo Could not convert streetindexes
37fi