summaryrefslogtreecommitdiff
path: root/bibtotxt.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bibtotxt.sh')
-rwxr-xr-xbibtotxt.sh7
1 files changed, 4 insertions, 3 deletions
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: <http://purl.org/dc/elements/1.1/>
@@ -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/"$//'`