From owner-freebsd-stable@FreeBSD.ORG Fri Jan 9 21:33:40 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4794116A4CE for ; Fri, 9 Jan 2004 21:33:40 -0800 (PST) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FD9B43D1D for ; Fri, 9 Jan 2004 21:33:38 -0800 (PST) (envelope-from malcolm.kay@internode.on.net) Received: from beta.home (ppp104-184.lns1.adl1.internode.on.net [150.101.104.184])i0A5XWqR092335; Sat, 10 Jan 2004 16:03:32 +1030 (CST) Content-Type: text/plain; charset="iso-8859-1" From: Malcolm Kay Organization: At home To: pixfBSD , freebsd-stable@freebsd.org Date: Sat, 10 Jan 2004 16:03:31 +1030 User-Agent: KMail/1.4.3 References: <1073707290.4872.9.camel@hawk.dlqj.net> In-Reply-To: <1073707290.4872.9.camel@hawk.dlqj.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200401101603.31874.malcolm.kay@internode.on.net> Subject: Re: hp date stamp ink cartridges X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2004 05:33:40 -0000 On Sat, 10 Jan 2004 14:31, pixfBSD wrote: > #!/bin/sh > # > # hpif - Simple text input filter for lpd for HP-PCL based printers > # Installed in /usr/local/libexec/hpif2 > # > # Simply copies stdin to stdout. Ignores all filter arguments. > # Tells printer to treat LF as CR+LF. Ejects the page when done. > > printf "\033&k2G" && cat && printf "\033&l0H" | sed -e 's/@PJL SET > DATE=3D[0-3][0-9]-[01][0-9]-20[0-9][0-9]/@PJL SET DATE=3D01-12-2001/g' = && > exit 0 > exit 2 > > Thanks to the suggestion of the sed syntax I've tried a few renditions > of this script. (Sorry I forget who was the kind person with this > syntax) I've been through a reload and could have sworn I had a backup > of my mail directory :-P doh! > > I've put the sed part after first ""printf "\033&k2G" && sed -e 's/@PJL > SET DATE=3D[0-3][0-9]-[01][0-9]-20[0-9][0-9]/@PJL SET DATE=3D01-12-2001= /g' > ..."" I've even tried piping it after the first printf. It still > doesn't change the date on the dfA009. This was my suggestion! (I thought you had disappeared into oblivion ;-) ). > > If I sed -e 's/@PJL SET DATE=3D[0-3][0-9]-[01][0-9]-20[0-9][0-9]/@PJL S= ET > DATE=3D01-12-2001/g' dfA009 > dfA009. It d= oes > change the line just fine. > Then maybe sed is not in the path as seen by lpd. Try a full path: i.e. /usr/bin/sed in place of sed. I should have thought of this possibility in the first place. (I believe the 'cat' should be superfluous) For the record, my original suggestion was: printf "\033&k2G" && sed -e 's/@PJL SET DATE=3D[0-3][0-9]-[01][0-9]-20[0-= 9][0-9]/@PJL SET DATE=3D01-12-2000/g' && printf "\033&l0H" && exit 0 Malcolm Kay