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>
This commit is contained in:
Bill Fumerola 1998-12-08 22:09:05 +00:00
parent c56690ef7b
commit 6faaa698e4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41604
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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