From: Matteo Nastasi Date: Wed, 7 Sep 2011 12:50:30 +0000 (+0200) Subject: concatenate sed commands X-Git-Tag: v0.1.3~4 X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=populate.git;a=commitdiff_plain;h=6a3d74d0a9a59c22d1dd4dc3311cd07b920703d9 concatenate sed commands --- diff --git a/populate.sh b/populate.sh index de6b1b7..9a9b7e6 100755 --- a/populate.sh +++ b/populate.sh @@ -118,8 +118,12 @@ s/é/\\'"'"'e/g;s/í/\\'"'"'i/g;s/ó/\\'"'"'o/g;s/ú/\\'"'"'u/g;s/°/\$\^\\circ\ s//\\textit{/g;s//\\textbf{/g;s/<\/[ib]>/}/g;s//URL: \\textit\{/g;s/<\/url>/\}/g; s/“/``/g;s/”/'"''"'/g;s///g;s/<\/lang:tex>//g;s/]*>.*<\/lang:[^>]*>//g' elif [ "$1" = "htm" ]; then - sed "s/${NEWLI}${NEWLI}/
${NEWLI}/g;"'s/\([^<]*\)<\/url>/\1<\/a>/g; -s///g;s/<\/lang:htm>//g;s/]*>.*<\/lang:[^>]*>//g' + sed 's//\n\n/g;s/<\/url>/\n<\/url>\n/g; + /^$/,/^<\/url>$/ { s/\\_/_/g; }; + /^$/,/^<\/url>$/ { s/\(^[^<].*\)/\1<\/a>/g; }; + s/^$//g;s/^<\/url>$//g' | tr -d '\n' | \ + sed "s/${NEWLI}${NEWLI}/
${NEWLI}/g;"' + s///g;s/<\/lang:htm>//g;s/]*>.*<\/lang:[^>]*>//g' fi )