Unable to print correctly html on Windows Printer (SMB) Share

Joel Hammer jhammer2 at home.com
Sat Nov 17 09:38:02 GMT 2001


> In the filter put this:
> echo $CONTROL > mycontrol
A slight improvement on the above:
echo "$CONTROL" > mycontrol
This gives each parameter on its own line, a convenience for scripting.
Hjhammer6.jhammer.org
Proot
Jfilter
CA
Lroot
Nfilter
ldfA443jhammer6.jhammer.org
UdfA443jhammer6.jhammer.org

Then, the filter to print and to remove the control files from the queue
might look like this. The three commented lines are put in for clarity,
since they would do what the single rm line does.
#!/bin/bash
echo "$CONTROL" > mycontrol
enscript -M Letter -Z -p - |  \
gs -sDEVICE=cdj550 -q -sOutputFile=- - | \
smbclient \\\\jhammer6\\test -c 'print -' -N
rm *$(a=`hostname`;cat mycontrol | sed -n "s/\(Udf\)\(.*\)\($a\)/\2/p")*
#       a=`hostname`
#       b=$(cat mycontrol | sed -n "s/\(Udf\)\(.*\)\($a\)/\2/p")
#       rm *$b*
exit 0                     

You may wonder about all this fuss just for printing, but, believe me, it is
worth knowing this stuff.
Joel





More information about the samba mailing list