Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-07-2005, 12:26 PM   #1
LQ Newbie
Registered: Sep 2005
Posts: 3

Rep: Reputation: 0
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
Old 09-07-2005, 12:33 PM   #2
Registered: Aug 2003
Location: Britain
Distribution: Debian, MacOSX, FreeBSD
Posts: 65

Rep: Reputation: 18
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.
Old 09-07-2005, 12:41 PM   #3
LQ Newbie
Registered: Sep 2005
Posts: 3

Original Poster
Rep: Reputation: 0
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...
Old 09-07-2005, 12:52 PM   #4
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 125Reputation: 125
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.
Old 09-07-2005, 12:54 PM   #5
LQ Newbie
Registered: Sep 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Thnx both of U, i'll try when i can access my Linux PC.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hint: Wanna try Linux, so wanna rig your Windows system to dual-boot? sundialsvcs Linux - Newbie 2 08-16-2005 03:56 PM
How to write a Script Blake Linux - Software 6 07-18-2004 12:41 PM
how to write this script? MeganageM Linux - Newbie 1 03-10-2004 06:01 PM
Wanna write a shell benjaminrtz Programming 12 10-19-2003 03:00 PM
wanna write a driver sanglih Linux - Hardware 1 06-05-2002 08:22 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration