From: byrnejb on 25 Mar 2010 15:42 I have googled for this topic but cannot seem to find anything useful. I want to print a few things directly from an irb session to one of a number of networked printers that I have configured with CUPS. $ lpstat -v device for HPLj5N: socket://168.192.1.49:9100 device for NP4172: lpd://168.192.1.52/NP4172 device for NP4173: lpd://168.192.1.53/NP4173 device for NP4174: lpd://168.192.1.54/NP4174 For example: >> my_lp = File.open("????","w") >> >> my_lp.puts(my_array) What argument string do I use in order to obtain an IO stream to one of these devices?
From: Ken Bloom on 27 Mar 2010 22:08 On Fri, 26 Mar 2010 04:42:35 +0900, byrnejb wrote: > I have googled for this topic but cannot seem to find anything useful. > I want to print a few things directly from an irb session to one of a > number of networked printers that I have configured with CUPS. > > $ lpstat -v > device for HPLj5N: socket://168.192.1.49:9100 device for NP4172: > lpd://168.192.1.52/NP4172 device for NP4173: lpd://168.192.1.53/NP4173 > device for NP4174: lpd://168.192.1.54/NP4174 > > For example: > >>> my_lp = File.open("????","w") >>> >>> my_lp.puts(my_array) > > What argument string do I use in order to obtain an IO stream to one of > these devices? my_lp = IO.popen("lp -d printername") -- Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/
|
Pages: 1 Prev: Last Call for Ruby Midwest Speakers Next: --disable-gems permanent? |