Technical Discussion
  >> Apple Issues


Register (or login) on our website and you will not see this ad.


  Print Thread
Moderator billford
(moderator) Thu 12-May-11 01:51:18
Print Post

Command line printing


[link to this post]
 
Way back in the dim and distant I could issue a command like

dir c:\documents > lpt1:

or print | dir c:\documents

from a DOS command prompt and get the output on a printer.

I'll admit I haven't tried it, but I doubt if either would work under Snow Leopard tongue

Is there an easy way to redirect (or pipe) terminal output (generally, not just from the ls command) to the default printer, or is it easier to carry on redirecting output to a file and printing it from TextEdit?

I've tried a few man lookups, like man print, but they didn't help and I don't really know what I'm looking for crazy

~~~~~~~~~~~~
Bill

[email protected] _______________Planes and Cars and ..._______________BQM
The author of the above post is a thinkbroadband moderator but it does not constitute an official statement on behalf of thinkbroadband.
Standard User deleted
(deleted) Thu 12-May-11 07:28:49
Print Post

Re: Command line printing


[re: billford] [link to this post]
 
The equivalent to the DOS print command is "lpr". Try piping the output of the command to that.
Standard User deleted
(deleted) Thu 12-May-11 09:48:54
Print Post

Re: Command line printing


[re: deleted] [link to this post]
 
man lpr gives details.

I just tried:

echo "Hello World" | lpr

and it printed as expected.

Edited by deleted (Thu 12-May-11 09:51:20)


Register (or login) on our website and you will not see this ad.

Moderator billford
(moderator) Thu 12-May-11 10:06:03
Print Post

Re: Command line printing


[re: deleted] [link to this post]
 
That's the kiddie, works a treat smile

Thanks both.

~~~~~~~~~~~~
Bill

[email protected] _______________Planes and Cars and ..._______________BQM
The author of the above post is a thinkbroadband moderator but it does not constitute an official statement on behalf of thinkbroadband.
  Print Thread

Jump to