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:
parent
af7f6752b9
commit
23cc627071
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=3896
1 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
<!-- This is an SGML document in the linuxdoc DTD describing
|
||||
Printing with FreeBSD. By Sean Kelly, 1995.
|
||||
|
||||
$Id: printing.sgml,v 1.22 1998-07-20 01:32:44 jkoshy Exp $
|
||||
$Id: printing.sgml,v 1.23 1998-12-08 22:09:04 billf Exp $
|
||||
|
||||
The FreeBSD Documentation Project
|
||||
|
||||
|
@ -2245,13 +2245,13 @@ 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
|
||||
</code>
|
||||
|
@ -2327,7 +2327,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 0
|
||||
echo "$first_line" && cat && printf "\f" && exit 0
|
||||
fi
|
||||
|
||||
exit 2
|
||||
|
|
Loading…
Reference in a new issue