Protect input parameter file name with double quotes every where in case it contains white space. Closes issue #28

This commit is contained in:
Jean-Francois Dockes
2010-09-30 17:01:37 +02:00
parent 13d550a40e
commit 7b803170c2
12 changed files with 16 additions and 16 deletions
+5 -5
View File
@@ -106,7 +106,7 @@ sedjoinprog=':a
#P;D'
# Extract description title author and keywords
description=`sed -e "$sedjoinprog" < $infile | \
description=`sed -e "$sedjoinprog" < "$infile" | \
awk '
/<DOCUMENT / {
if (match($0, " COMMENTS=\"[^\"]+")) {
@@ -117,7 +117,7 @@ awk '
}
'`
title=`sed -e "$sedjoinprog" < $infile | \
title=`sed -e "$sedjoinprog" < "$infile" | \
awk '
/<DOCUMENT / {
if (match($0, " TITLE=\"[^\"]+")) {
@@ -128,7 +128,7 @@ awk '
}
'`
author=`sed -e "$sedjoinprog" < $infile | \
author=`sed -e "$sedjoinprog" < "$infile" | \
awk '
/<DOCUMENT / {
if (match($0, " AUTHOR=\"[^\"]+")) {
@@ -139,7 +139,7 @@ awk '
}
'`
keywords=`sed -e "$sedjoinprog" < $infile | \
keywords=`sed -e "$sedjoinprog" < "$infile" | \
awk '
/<DOCUMENT / {
if (match($0, " KEYWORDS=\"[^\"]+")) {
@@ -165,7 +165,7 @@ cat <<EOF
EOF
sed -e ':a' -e '/[^>] *$/N; s/\n/ /; ta' < $infile | \
sed -e ':a' -e '/[^>] *$/N; s/\n/ /; ta' < "$infile" | \
awk '
/<ITEXT / {
if (match($0, " CH=\"[^\"]+")) {