Re: filter
"Marcelo Chiapparini" <chiappa@centroin.com.br> wrote:
>I am trying to set my printer to work with potato. It is a HP
>DeskJet870Cxi. After installing the
>lpr package I can print text files, but with a "stair" effect. I added the
>following entry to the
>pritcap file:
>
> :if=/etc/filter.txt:\
>
>where the file filter.txt is
>
> #!/usr/bin/perl
> while(<STDIN>){chop $_; print "$_\r\n";};
> print "\f"
>
>this filters is supposed to solve the stair effect. But when a try to
>print a text file, the system complies about
>the following:
>
> cannot execv /etc/filter.txt
1) You almost certainly need to 'chmod +x /etc/filter.txt'.
2) Executable programs aren't normally put in /etc these days; try
/usr/local/bin instead.
3) Perl programs conventionally have the extension .pl, not .txt.
4) Is the spacing above literal? The '#!' needs to be the first two
characters in the file.
5) unix2dos (in the sysutils package) does roughly the same thing as
your program, although without the form-feed at the end.
Only 1) is (likely to be) causing your problem, but the rest are (I
hope) useful stylistic comments. :)
--
Colin Watson [cjw44@flatline.org.uk]
Reply to:
- References:
- filter
- From: "Marcelo Chiapparini" <chiappa@centroin.com.br>