Mon Dec 1 11:34:25 GMT 2003
and then can give commands like print file
There must many other things you can do interactively, but I just don't
from the command line:
cat file | smbclient \\\\\jhammer6\\test -c 'print -'
The most important thing to understand about these bash script filters is
that they allow you
to talk to your printer or do other tasks during the printing.
For example, if you really had to, you could put in a command to remove the
control files from your print queue after the print job is done, sorta like
In the filter put this:
echo $CONTROL > mycontrol
This inserts the following into that file:
Hjhammer6.jhammer.org Proot Jjunk CA Lroot Njunk ldfA127jhammer6.jhammer.org
You could then run a script after the printing is done to remove all the
files with the control number A127.
Or, you could put in, at the end:
echo File Printed | mail -s PrintingDone user
Of course, you have to get the user name from the $CONTROL information in
that mycontrol file.
This can get complicated. There is good documentation for LPRng in:
/usr/share/doc/LPRng-Howto or some such.
This seems like a lot, but printing will be a continuing problem if you use
linux, especially on a network. Once you understand a few concepts, network
printing is FUN. The only problem is getting printer drivers for
More information about the samba