fixed xml creator script
authorhackbard <hackbard>
Fri, 28 Feb 2003 15:35:26 +0000 (15:35 +0000)
committerhackbard <hackbard>
Fri, 28 Feb 2003 15:35:26 +0000 (15:35 +0000)
create-xml

index 753308e..529c180 100755 (executable)
@@ -59,11 +59,7 @@ while [ "1" ]; do
    <text size="20">$kapitel</text>
        <text/>
 EOF
-       for up in `grep ^${count} $file | awk -F^ '{ for(i=3;i<=NF;i++) print $i }'`; do
-               cat >> $name << EOF
-        <listitem size="20">$up</listitem>
-EOF
-       done
+       grep ^${count} $file | awk -F^ '{ for(i=3;i<=NF;i++) print "        <listitem size=\"20\">"$i"</listitem>" }' >> $name
        cat >> $name << EOF
         <text/>
 EOF
@@ -88,17 +84,13 @@ while [ "1" ]; do
 
 EOF
        ((j = 0))
-       for up in `grep ^${count} $file | awk -F^ '{ for(i=3;i<=NF;i++) print $i }'`; do
-               cat >> $name << EOF
-    <text size="20">$up</text>
-        <text/>
-        <listitem size="20">muster</listitem>
-        <listitem size="20">muster</listitem>
-        <listitem size="20">muster</listitem>
-        <listitem size="20">muster</listitem>
-        <text/>
-EOF
-       done
+       grep ^${count} $file | awk -F^ '{ for(i=3;i<=NF;i++) print "    <text size=\"20\">" $i "</text> \
+        <text/> \
+        <listitem size=\"20\">muster</listitem> \
+        <listitem size=\"20\">muster</listitem> \
+        <listitem size=\"20\">muster</listitem> \
+        <listitem size=\"20\">muster</listitem> \
+        <text/>" }' >> $name
        cat >> $name << EOF
   </slide>
 EOF