From 7a0c25eac0f1c2adf031343ff8c761ba73570cb6 Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 14 Sep 2010 15:08:39 +0100 Subject: Use gnu sed syntax by default in bibtotxt --- bibtotxt.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bibtotxt.sh') diff --git a/bibtotxt.sh b/bibtotxt.sh index e6de507..1c53ce4 100755 --- a/bibtotxt.sh +++ b/bibtotxt.sh @@ -3,7 +3,7 @@ rdf="$1" echo "Publications" -echo "=======================================================================" +echo "-----------------------------------------------------------------------" echo "" q="PREFIX dc: @@ -23,11 +23,12 @@ WHERE { roqet -q -r csv -e "$q" -D /dev/stdin < $rdf | sed '/^Result/d' \ | while read r; do - uri=`echo $r | awk -F , '{print $2}'| sed -e 's/^uri\(//' -e 's/\)$//'` + # note that plan9 sed needs the ( in uri( etc escaped with \( + uri=`echo $r | awk -F , '{print $2}'| sed -e 's/^uri(//' -e 's/)$//'` reluri=`echo $uri | sed 's/.*\///'` title=`echo $r | awk -F , '{print $3}'| sed -e 's/^"//' -e 's/"$//'` artdate=`echo $r | awk -F , '{print $4}'| sed -e 's/^"//' -e 's/"$//'` - stat=`echo $r | awk -F , '{print $5}'| sed -e 's/^uri\(//' -e 's/^[^\/]*\///' -e 's/\)$//'` + stat=`echo $r | awk -F , '{print $5}'| sed -e 's/^uri(//' -e 's/^[^\/]*\///' -e 's/)$//'` jtitle=`echo $r | awk -F , '{print $6}'| sed -e 's/^"//' -e 's/"$//'` juri=`echo $r | awk -F , '{print $7}'| sed -e 's/^"//' -e 's/"$//'` vol=`echo $r | awk -F , '{print $8}'| sed -e 's/^"//' -e 's/"$//'` -- cgit v1.2.3