home | list info | list archive | date index | thread index

[OCLUG-Tech] writing scripts for printing (lpr) ??


I want to write some small scripts for printing files.  I've looked in
man lpr and googled.  Can someone tell me where I can find the
appropriate information to do the following?

Script #1:  Print any text file to 5.5" x 8.5" sheets of paper.  I keep
my scrap printer paper and cut it in half for notes to myself.  I want a
lpr script that can use the same scrap paper to print notes etc. that I
write to myself.  I write them on all kinds of different word processors
and text editors but want to print them unformatted.  

lpr has the -o option but doesn't mention how I might use it set custom
paper size.  Where should I look?

Script #2: Some suggestions on how I might go about accomplishing Script
#2 would be appreciated.  I want to start a lpr print job X number of
lines down on the first sheet or page.  This is so that if I have a note
that is, say, 12 lines long and I want to add more I can rerun the sheet
through the printer and add the new text (from a different text file) to
the white space after line 12 of the sheet of paper.

All of the above can be down through a word processor but I am hoping to
set something up that is quick and dirty.

Regards Bill