|
|
|
|
#!/bin/sh
|
|
|
|
|
sed '/^+[^+]/!s/ /TaBBaT/g' |\
|
|
|
|
|
expand -t $(seq -s , 9 8 200) |\
|
|
|
|
|
sed 's/TaBBaT/ /g' |\
|
|
|
|
|
sed '/^+[^+]/s/ * $//' |\
|
|
|
|
|
tr -d '\015' |\
|
|
|
|
|
tr '\n' '<EFBFBD>' |\
|
|
|
|
|
sed 's/\(@@[^@]*@@<EFBFBD>[^@]*\)/\n\1/g' |\
|
|
|
|
|
egrep -v '@@[^@]*@@<EFBFBD>(( [^<EFBFBD>]*<EFBFBD>)|([+-][[:space:]]*<EFBFBD>)|(-[[:space:]]*([^<EFBFBD>]*)<EFBFBD>\+[[:space:]]*\5<EFBFBD>))*$' |\
|
|
|
|
|
tr -d '\n' |\
|
|
|
|
|
tr '<EFBFBD>' '\n'
|