Re: Appending CR to syslog output?
From: Dan Nelson (dnelson_at_allantgroup.com)
Date: 11/05/04
- Previous message: Simon Burke: "Re: Help me, Get a Free flat screen"
- In reply to: Kevin A. Pieckiel: "Appending CR to syslog output?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 5 Nov 2004 09:46:34 -0600 To: freebsd-questions@freebsd.org
In the last episode (Nov 05), Kevin A. Pieckiel said:
> How do I get syslog to append a CR to output when it's being sent to
> a line printer on /dev/lpt0?
Couple of options here:
o Tell your printer that eols are LF instead of CRLF (if it can be
configured to remember this on powerup)
o Log to "|sed -e 's/$/^m' > /dev/lpt0" (where ^m is a raw CR)
o If your printer knows an escape sequence to put it in LF mode, log
to "| echo 'escsequence' ; cat > /dev/lpt0"
o Set up a printcap with an input filter that adds the CR (or sends
the magic escape sequence), and log to "|lp"
o Edit syslogd.c to add the CRLF if the device printed to starts with
"/dev/lpt"
-- Dan Nelson dnelson@allantgroup.com _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
- Previous message: Simon Burke: "Re: Help me, Get a Free flat screen"
- In reply to: Kevin A. Pieckiel: "Appending CR to syslog output?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]