X-Git-Url: https://hackdaworld.org/gitweb/?p=lectures%2Fdfb-slides.git;a=blobdiff_plain;f=cont2xml;h=0148067df931e866626c3ab81795fd05cf91b848;hp=42aab82d0251d4fee0e36eadd3cec8f1bb0a9eb3;hb=HEAD;hpb=e04c1bea5163a60a2646bfc7163ffe3ac20a1779 diff --git a/cont2xml b/cont2xml index 42aab82..0148067 100755 --- a/cont2xml +++ b/cont2xml @@ -59,7 +59,7 @@ while [ "1" ]; do ((j = 0)) ((count += 1)) cat >> $trgfile << EOF -`grep ^${count} $srcfile | awk -F^ '{ print $0 }'` +`grep ^${count} $srcfile | awk '{ print $0 }'` EOF grep ^\ ${count}\.[0-9] $srcfile | awk '{ print ""$0"" }' >> $trgfile @@ -85,17 +85,16 @@ while [ "1" ]; do
`grep ^${count} $srcfile`
-EOF - -if [ -f ./1337.pl ] ; then - ./1337.pl $@ $count -else - echo "can't execute ./1337.pl $@ $count ... (hunz!!!) :)" -fi - -# hunz's 1337.pl inserts content here ;) -# ./1337.pl $@ $count ($1 is targetfile, $2 is sourcefile) +EOF + + total_j=`grep ^\ ${count}.[0-9] $srcfile | tail -1 | awk '{ print $1 }' | awk -F . '{ print $2 }'` + echo " - ${total_j} chapters below" + ((count_j = 0)) + + #while [ "1" ]; do + # cat + # temporal devel break, stonefly will have a look at this script now! :) cat >> $trgfile << EOF