Date: Tue, 27 May 1997 22:37:40 -0800 (AKDT) From: Steve Howe <un_x@anchorage.net> To: freebsd-questions <questions@freebsd.org> Subject: Re: print filter Message-ID: <Pine.BSF.3.95q.970527223532.3268C-100000@aak.anchorage.net> In-Reply-To: <199705271019.MAA00626@CoDe.hu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 27 May 1997, Zahemszky Gabor wrote: > > this is an "auto" bsd/dos lp filter i whipped up ... > > can anyone tell me why it prints a blank line at the > > beginning of each document (not page, document ...)? it actually prints the first line twice. > if echo "$line1" | grep -q '^M' ; then ... this doesn't change the behavior. > > ------------------------------------------------------------------------- > > #!/bin/sh > > # > > # simple lp text filter (BSD/DOS) > > > > read line1 > > > > if echo $line1 | grep ^M; then > > echo $line1 && cat && echo ^L && exit 0 > > else { echo $line1 && cat; } | sed s/$/^M/ && echo ^L && exit 0 > > fi > > exit 2 ------------------------------------------------------------------------- Sleep: a sign a caffeine deprivation ... http://www.anchorage.net/~un_x -------------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970527223532.3268C-100000>