ulpt0 vs. unlpt0

So I'm playing with 10.1-RELEASE, and while it's running I plug in a USB printer. Two new devices appear: /dev/ulpt0 and /dev/unlpt0. My situation is simple; I'm not going to use lpr or CUPS or anything like that. I can cat data to either device, and it comes out just fine (other than the stairstep problem). My main question is this: What's the difference between using /dev/ulpt0 and using /dev/unlpt0?

A supplemental question: I haven't been able to find on the base 10-RELEASE system any filter like todos or unix2dos to add carriage returns before line feeds to eliminate the stairstep problem. I could write a trivial filter to do this, but I'd feel foolish doing so if it turned out that FreeBSD had a package that included a program that would do this for me. Is there such?
 
A supplemental question: I haven't been able to find on the base 10-RELEASE system any filter like todos or unix2dos to add carriage returns before line feeds to eliminate the stairstep problem. I could write a trivial filter to do this, but I'd feel foolish doing so if it turned out that FreeBSD had a package that included a program that would do this for me. Is there such?
Code:
       #!/bin/sh
       FILE=${SRC}
       tr -d '\r' < ${FILE} > aux
       mv aux ${FILE}
 
/dev/ulpt0 is reset then opened, /dev/unlpt0 is just opened. This makes a difference on many printers that are still busy doing the reset when data arrives. If your printer works both ways, it does not matter which you use.

Oko: I thought the canonical solution was col -b.
 
Back
Top