Print from shell to HP wireless printer
I've been having trouble printing to my HP wireless (P1102W) printer from either of my 2 Macs. As a developer I spend a lot of time in the shell (bash) and have been quite happy with the command-line tools available. One of things I would like to do is print from the shell - either interactively or from a shell script.
The only ways I know how to do this involve using 'lp' or 'lpr' and I'm sure they work the way they are supposed to. Except apparently if you try to print to an HP printer like mine. It DOES print fine from any other applications.
When I send a print job to the printer from my Macbook Air shell or the iMac shell, a window pops up on my iMac telling me to load paper in the manual feed tray and press 'Enter'. When I press 'Enter' it prints the job. I'm trying to avoid this if possible.
Example:
grep '006.' music.trxt | lp
Email to HP Support came back with this:
"We are sorry to let you know that HP Printers are designed to print from Graphical User Interface applications. For example, the applications from which you can select File-> Print to open a print window for further options. So you are able to print from the other applications. Regarding printing from the shell, we do not have the required expertise since this directly deals with the MAC operating system. Hence, I would request you to contact the Apple support team for more information."
Hence my posting here.
Does anyone have any similar problems?
Have you found a work-around?
Is there a way to insert a form-feed or carriage-return on the command line as part of the print command? I've tried using the Ctrl-V - insert_a_command trick but no joy.
I love my iMac but this is driving me crazy. Thanks for any suggestions / help.
iMac, Mac OS X (10.7.5), HP P1102W wireless