LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-07-2005, 11:26 AM   #1
djflix
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, 11:33 AM   #2
FrankP
Member
 
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, 11:41 AM   #3
djflix
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, 11:52 AM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 124Reputation: 124
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, 11:54 AM   #5
djflix
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.
 
  


Reply


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 02:56 PM
How to write a Script Blake Linux - Software 6 07-18-2004 11:41 AM
how to write this script? MeganageM Linux - Newbie 1 03-10-2004 05:01 PM
Wanna write a shell benjaminrtz Programming 12 10-19-2003 02:00 PM
wanna write a driver sanglih Linux - Hardware 1 06-05-2002 07:22 PM


All times are GMT -5. The time now is 08:26 PM.

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