From owner-freebsd-questions@FreeBSD.ORG Fri Nov 5 15:46:36 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 074DD16A4CE for ; Fri, 5 Nov 2004 15:46:36 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AFFD43D39 for ; Fri, 5 Nov 2004 15:46:35 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.1) id iA5FkYS8071148 for freebsd-questions@freebsd.org; Fri, 5 Nov 2004 09:46:34 -0600 (CST) (envelope-from dan) Date: Fri, 5 Nov 2004 09:46:34 -0600 From: Dan Nelson To: freebsd-questions@freebsd.org Message-ID: <20041105154633.GF10428@dan.emsphone.com> References: <20041105141246.GA16190@SDF.LONESTAR.ORG> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041105141246.GA16190@SDF.LONESTAR.ORG> X-OS: FreeBSD 5.3-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i Subject: Re: Appending CR to syslog output? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2004 15:46:36 -0000 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