- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: lpr command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2002 08:15 AM
тАО11-14-2002 08:15 AM
I want to print a text file to a printer using the command line, is this possable?
Alan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2002 08:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2002 08:20 AM
тАО11-14-2002 08:20 AM
Re: lpr command
you could use
lp -d
assuming the printer has been set up
HTH Billy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2002 08:26 AM
тАО11-14-2002 08:26 AM
Re: lpr command
lpr (or rlp) is used for printing to remote printers. It invokes the rlpdaemon. How was printer set up...??
So, might I ask what device are you printing to??? I think that info might be helpful..
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2002 08:27 AM
тАО11-14-2002 08:27 AM
Re: lpr command
I'm having problems with the interpretation of Carriage Return with this command, it is skewing accross the page, any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2002 08:32 AM
тАО11-14-2002 08:32 AM
Re: lpr command
got it to work with ux2dos command
Thanks for the help
Alan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2002 08:33 AM
тАО11-14-2002 08:33 AM
Re: lpr command
If the file came from a Windows environment, a line is delimited with a linefeed/carriage-return instead of a linefeed. The appearance of this usually means you FTP'd a "text" file from Windows to Unix in binary instead of ASCII mode. To strip the carriage-returns and print the file do:
# dos2ux myfile|lp
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2002 08:41 AM
тАО11-14-2002 08:41 AM
Re: lpr command
UNIX only uses lf as a line delimiter, Windows uses crlf.
There are some options...
It's usually possible to configure the printer to interpret lf as crlf.
If you've got the printer connected via a Jetdirect card, the lp subsystem uses a program called 'hpnpf' to send the file to the printer. Have a look at 'man hpnpf' and check out the -n and -N flags, one of these should fix your problem. Implement it by amending the relevant interface script (/etc/lp/interface/
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-14-2002 08:43 AM
тАО11-14-2002 08:43 AM
Re: lpr command
I suspect you were thinking of the pr command which is sometimes used to format files before piping them to lp.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2002 05:35 AM
тАО11-18-2002 05:35 AM
Re: lpr command
For a printer named printer#, you must use the following command to print filename
lp -dprinter# filename
For a printer named printer#, configured with an interface script that defines the -c option to cause the printer to print in a compressed mode, use the following command to print filename with compressed print on printer#:
lp -dprinter# -oc filename
Regards.
Ernesto.