TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:7538] printing (print filter!) problems



>#!/bin/sh
>#Remove stair stepping.
>awk '{print $0"\r"}' 
>
>Then make it executable with 
>chmod 755 /var/spool/lpd/osas/my-filter
>
>Add this to your /etc/printcap:
>---
>osas:\
>          :sd=/var/spool/lpd/osas:\
>          :if=/var/spool/lpd/osas/my-filter:\
>          :mx#0:\
>          :lp=/dev/lp1:
        hey, it WORKED!
        thanks a million! you saved us from a Windows accounting program. :)
        been trying for weeks to figure that out.
        looks like sed was crapping out on the problem (see below) but awk
doesn't.

looks like (to me) that the program is indeed broken; but at least we have a
workaround here.
a friend of mine this weekend, suggested it was an EOF problem, and that I
try a binary file comparison on a file that worked, and an identical file
that didn't work.
        so here it is:        
[root@office /tmp]# cmp head.rpt head3.rpt
cmp: EOF on head.rpt
[root@office /tmp]# diff head.rpt head3.rpt
30c30
< End of Report

\ No newline at end of file
---
> End of Report

        so does this mean that the first one (the problem one) was missing
the EOF? anyone understand the specifics of why " sed -e 's/$/'`echo -ne
'\r'`'/g' " would crap out w/out an EOF?

thanks a bundle everyone!
Carl Soderstrom
System Administrator	307 Brighton Ave. 
Minnesota DHIA		Buffalo, MN	
carls@agritech.com		(612) 682-1091