Unix systems send LF only. Windows systems expect CRLF.
There aere numerous ways to handle this,
Change the printer so that it generates a CR when it gets a line feed. Most printers can do this, and if you use it for DOS, it just means there is an "extra" CR, which changes nothing. This is done with dip switches or a printer configuration panel.
Change the printer by sending it whatever escape sequences it needs to add CR's to LF's. This is going to vary, and you are going to need to add it in the interface script low enough that it doesn't get reset by some other command being sent out.
Set the "stty onlcr opost" in the interface script. This can be done from the printer manager on Release 4 and 5, or by using the "crnlmap" model; unfortunately it does not always work (for example, it can't work for network printers). See:
Move the "stty onlcr opost" to a "hold-open" script (see the article on serial printers) for this port. This works, but it's annoying, and again won't work for network printers.
Filter the output through /usr/lib/lponlcr. This involves piping the output through that on it's way out. In the "standard" script, you might set FILTER=/usr/lib/lponlcr". In other scripts, just add " | /usr/lib/lponlcr" on the line that cats the file.
If you are using an HP network printer, you can add "-n" or even "-N" to the the interface.
Don't add it to the "HPNPF=" line; add it in the line(s) that actually uses $HPNPF. For example, you'd change
if $REALMODEL "$@" | $HPNPF -x $PERIPH 2> $LOG > /dev/null
to
if $REALMODEL "$@" | $HPNPF -x $PERIPH -n 2> $LOG > /dev/null
See man hpnpf Tony Lawrence
SCO Unix/Linux Resources
tony@pcunix.com