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

RE: [TCLUG:7538] printing (lpr/lpd?) problems



>
>         if I could get it to print to a file; I suppose I could try to
> kludge a sed script to remove the annoying ^L character at the end, then
> print it. this is a bit beyond my understanding, tho...
>

sed -e "s/^L//g" file1.txt > file2.txt

This will remove all the ^L characters from the print job.  If you only want
to remove the one at the end of the print job, the following command will
cut off the last line:

tmpvar=`cat file1.txt|wc -l`; head -n `expr $tmpvar - 1` file1.txt >
file2.txt

Disclaimer: There are a gazillion people out there who know more about shell
programming than I do and are probably wincing at the inelegance of my
examples.  Nonetheless these should be enough to get you started.

--
Carl Patten
Systems Administrator
Trimodal Inc.