# Ferranti Interface for the HP Laserjet Printer

stty cs8 9600 -opost onlcr cread ixon ixoff -hupcl <&1 2>/dev/console
copies=$4
shift; shift; shift; shift; shift
files="$*"
i=1
#sleep 10
#echo "\033\105\c" 2>&1
#sleep 10
#echo "E&l7.64c66F\c"
echo "E&l70p2e66F&k12H&k2G\c"

while [ $i -le $copies ]
do
	for file in $files
	do
		pr -o8 -e -f -t "$file" > /tmp/lpdoc$$
		cat /tmp/lpdoc$$ 2>&1
		echo "\014\c"
		rm /tmp/lpdoc$$
	done
	i=`expr $i + 1`
done
exit 0
