LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   wanna write a script (https://www.linuxquestions.org/questions/linux-newbie-8/wanna-write-a-script-361092/)

djflix 09-07-2005 11:26 AM

wanna write a script
 
Hi All of U

I want to write a script which prints a logfile (or file from internet, an ascii file, .txt) to my dot matrix printer. In DOS there was a simple command to send a file @ascii to the printer, is there such a command for linux?

I tried google but it didn't work :/

Plz help, me= newbie

FrankP 09-07-2005 11:33 AM

lp is the usual command to put something on the print queue. But it relies on you having set up the printer port and drivers and all that already.

djflix 09-07-2005 11:41 AM

but does lp send the whole file? if you send a picture, would it print jibberish? because that is what i want, use it like a dot matrix printer...

Matir 09-07-2005 11:52 AM

For text files, you can generally just do 'cat file > /dev/lp0' without even setting up the printer. (Assumes the printer is a parallel port printer) Otherwise, set up the printer and do 'cat file | lp' for textfiles.

djflix 09-07-2005 11:54 AM

Thnx both of U, i'll try when i can access my Linux PC.


All times are GMT -5. The time now is 02:25 PM.