What is the content of the file /usr/spool/lp/admins/lp/interfaces/hpx451
assuming the destination name is hpx451, and assuming that you created the printer as a local printer.
and i suppose it did just that: i do not know for certain what happened (not enough data for that), but my supposition is that the netcat -script you use bypasses the printing system so effectively that the job is not removed from the printqueue at all.
Usually a print queue works like this: there is a place where files to be printed (=sent to the printer) are dropped. There is a daemon (usually lpd ) which picks up the file and - upon successful procession (=printing worked) removes it, otherwise issues an error message and does not remove it.
What fails, IMHO, is that the netcat -script needs to tell the lpd (or whatever you use in its place) about the successful (or unsuccessful) printing of the job so that the print file can be removed based on this.
modify netcat with vi or whatever so that it looks like:
:
#Set up some global variables.
: ${SPOOLDIR:=/usr/spool/lp}
: ${LOCALPATH:=${SPOOLDIR}/bin}
copies=$4
shift; shift; shift; shift; shift
files="$*"
i=1
while [ $i -le $copies ]
do
for file in $files
do
/path_to_netcat/netcat -p 9100 hp451x <{$file}
done
i=`expr $i + 1`
done
exit 0
Run scoadmin to add a local printer, selecting netcat as the model, and /dev/null as the device.
Note that the hp451x in the script should match an entry in /etc/hosts, and that the printer port number might not be 9100.