Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Nov 2004 09:46:34 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Appending CR to syslog output?
Message-ID:  <20041105154633.GF10428@dan.emsphone.com>
In-Reply-To: <20041105141246.GA16190@SDF.LONESTAR.ORG>
References:  <20041105141246.GA16190@SDF.LONESTAR.ORG>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041105154633.GF10428>