]> nuage.metani.fr Git - 3GPP.git/blobdiff - bin/38331-convert.sh
38331-convert.sh now removes duplicate blank lines
[3GPP.git] / bin / 38331-convert.sh
index cadce64f3787d07071a934cfe64b4a6bd28cd3c0..2faf2129381dd4508b75fa3f9fdcfa3f4035d802 100755 (executable)
@@ -74,7 +74,7 @@ fi
 
 mkdir -p by-IE
 cd by-IE
 
 mkdir -p by-IE
 cd by-IE
-txt2asn.awk "../${1%.docx}.txt" > "${1%.docx}.asn"
+txt2asn.awk "../${1%.docx}.txt" | awk '/^$/{ if (! blank++) print; next } { blank=0; print }' > "${1%.docx}.asn"
 cat "${1%.docx}.asn" | awk '!/^[[:space:]]*--/ && !/^[[:space:]]*$/'| sed -e 's/--.*$//g' > "${1%.docx}.asncheck"
 compare1=$(diff -b -B "../${1%.docx}.asncheck" "${1%.docx}.asncheck")
 if [[ "$compare1" ]] ; then
 cat "${1%.docx}.asn" | awk '!/^[[:space:]]*--/ && !/^[[:space:]]*$/'| sed -e 's/--.*$//g' > "${1%.docx}.asncheck"
 compare1=$(diff -b -B "../${1%.docx}.asncheck" "${1%.docx}.asncheck")
 if [[ "$compare1" ]] ; then
@@ -89,7 +89,7 @@ fi
 cd ..
 mkdir -p before-field
 cd before-field
 cd ..
 mkdir -p before-field
 cd before-field
-txt2asn-integrated.awk "../${1%.docx}.txt" > "${1%.docx}.asn"
+txt2asn-integrated.awk "../${1%.docx}.txt" | awk '/^$/{ if (! blank++) print; next } { blank=0; print }' > "${1%.docx}.asn"
 cat "${1%.docx}.asn" | awk '!/^[[:space:]]*--/ && !/^[[:space:]]*$/'| sed -e 's/--.*$//g' > "${1%.docx}.asncheck"
 compare2=$(diff -b -B "../${1%.docx}.asncheck" "${1%.docx}.asncheck")
 if [[ "$compare2" ]] ; then
 cat "${1%.docx}.asn" | awk '!/^[[:space:]]*--/ && !/^[[:space:]]*$/'| sed -e 's/--.*$//g' > "${1%.docx}.asncheck"
 compare2=$(diff -b -B "../${1%.docx}.asncheck" "${1%.docx}.asncheck")
 if [[ "$compare2" ]] ; then