In windows you can use LPR
In Linux you can do lpr or 'data.txt > /dev/lpt1/'
How do I do it on a Mac?
|
|
lpr works great on the Mac. If you type "lpr foo.txt" on my MacBook Pro, it gets sent to my default printer. Make sure that you have a printer setup. Update: I asked a few of the Mac guys in the office about this and they indicated that in the past, some low-end "Win-Printers" with Mac drivers were unable to actually process plain text coming from LPR. We've since removed all of these printers from our inventory, so I'm unable to verify. |
|||||
|
|
Another handy option is to use netcat to send a raw postscript file directly to a networked printer. This is occasionally useful in wierd circumstances, like if you don't have or don't want to install printer drivers. I find it particularly useful on Linux boxes since you never know quite how they are set up. Most Mac and Linux apps will print to a postcript file, and then you can run: nc 255.255.255.255 9100 < file.ps to send the postscript file directly to a printer on the network. (Replace the 255s with the actual printer IP address.) Not something you'll use every day, but if you do a lot of consulting/troubleshooting on the road with your laptop it may come in handy. |
|||
|
|