I know about this question (How do I send ASCII text to printer (over USB)?). But I'm working on something different. I'd like to be able to send text from within a bash script or Perl script to my printer.
Everything I find tells me about sending a text file to my printer. Is there any way to send text from within a script? (That way I don't have to generate the text, save it as a file, then print the file, then delete the file.)
Best Answer
lp
is able to read data from standard input, seeman lp
:So if you followed the advice given in the referenced question to install a "raw" printer you should be able to run