From 6a3d74d0a9a59c22d1dd4dc3311cd07b920703d9 Mon Sep 17 00:00:00 2001 From: Matteo Nastasi Date: Wed, 7 Sep 2011 14:50:30 +0200 Subject: [PATCH] concatenate sed commands --- populate.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 ) -- 2.17.1