summaryrefslogtreecommitdiffstats
path: root/share/examples/printing
diff options
context:
space:
mode:
authorbillf <billf@FreeBSD.org>1998-12-08 22:09:05 +0000
committerbillf <billf@FreeBSD.org>1998-12-08 22:09:05 +0000
commit9a6e85e2cb70a42061ba29972da96499502659ef (patch)
tree02cbf2ab1f0aead27857bb0c8065704768651ed9 /share/examples/printing
parente11c48f4b11b75b26ff4f5bd1a3a16a9a0934561 (diff)
downloadFreeBSD-src-9a6e85e2cb70a42061ba29972da96499502659ef.zip
FreeBSD-src-9a6e85e2cb70a42061ba29972da96499502659ef.tar.gz
Use quotes around the first_line variable so C comments and other things
that are misinterpreted by echo(1) aren't. PR: docs/8757 Submitted By: Takeshi OHASHI <ohashi@mickey.ai.kyutech.ac.jp> Sergei Laskavy <laskavy@gambit.msk.su>
Diffstat (limited to 'share/examples/printing')
-rw-r--r--share/examples/printing/ifhp2
-rw-r--r--share/examples/printing/psif4
2 files changed, 3 insertions, 3 deletions
diff --git a/share/examples/printing/ifhp b/share/examples/printing/ifhp
index 21e6643..373325b 100644
--- a/share/examples/printing/ifhp
+++ b/share/examples/printing/ifhp
@@ -26,7 +26,7 @@ else
# Plain text or HP/PCL, so just print it directly; print a form
# at the end to eject the last page.
#
- echo $first_line && cat && printf "\f" && exit 2
+ echo "$first_line" && cat && printf "\f" && exit 2
fi
exit 2
diff --git a/share/examples/printing/psif b/share/examples/printing/psif
index 2a657e0..1a816f6 100644
--- a/share/examples/printing/psif
+++ b/share/examples/printing/psif
@@ -12,12 +12,12 @@ if [ "$first_two_chars" = "%!" ]; then
#
# PostScript job, print it.
#
- echo $first_line && cat && printf "\004" && exit 0
+ echo "$first_line" && cat && printf "\004" && exit 0
exit 2
else
#
# Plain text, convert it, then print it.
#
- ( echo $first_line; cat ) | /usr/local/bin/textps && printf "\004" && exit 0
+ ( echo "$first_line"; cat ) | /usr/local/bin/textps && printf "\004" && exit 0
exit 2
fi
OpenPOWER on IntegriCloud