Date: Thu, 19 Nov 1998 15:14:12 +0900 (JST) From: ohashi@mickey.ai.kyutech.ac.jp To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: docs/8757: psif in printing.sgml in Handbook Message-ID: <199811190614.PAA17241@ateken2.mickey.ai.kyutech.ac.jp>
index | next in thread | raw e-mail
>Number: 8757
>Category: docs
>Synopsis: psif expands unexpected wildcard characters in some files.
>Confidential: yes
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-doc
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Nov 18 22:20:01 PST 1998
>Last-Modified:
>Originator: Takeshi Ohashi
>Organization:
Dept. of AI, Kyushu Inst. of Tech., Iizuka, JAPAN.
>Release: FreeBSD 3.0-RELEASE i386
>Environment:
FreeBSD ateken2.mickey.ai.kyutech.ac.jp 3.0-RELEASE FreeBSD 3.0-RELEASE #1: Sun Oct 25 16:04:46 JST 1998 root@ateken2.mickey.ai.kyutech.ac.jp:/usr/src/sys/compile/ATEKEN2 i386
>Description:
psif expands unexpected wildcard characters in some files.
For example, if C source codes start with "/*" characters,
it will be expanded files in the root directory.
To avoide this unexpected expansion, replace printf with echo.
>How-To-Repeat:
Install psif as an input filter for a PS printer
% cat "/* comment */" | lpr
or
% cat "/* comment */" | /usr/local/libexec/psif |gs -
>Fix:
--- printing.sgml.orig Thu Nov 19 14:58:11 1998
+++ printing.sgml Thu Nov 19 14:59:11 1998
@@ -2245,13 +2245,13 @@
#
# PostScript job, print it.
#
- echo $first_line && cat && printf "\004" && exit 0
+ printf "%s\n" "$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
+ ( printf "%s\n" "$first_line"; cat ) | /usr/local/bin/textps && printf "\004" && exit 0
exit 2
fi
</code>
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811190614.PAA17241>
