Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google site



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-07-2001
Registered User
 

Join Date: Jul 2001
Posts: 62
Question Problem with printing

Hi ,

Can somebody Please help me in finding out where I am going wrong.
Suppose i have a file called r_wer which contains files.
for ex :
LMN20001
LMN20002
LMN20003
Now I want to print them.

The way I am doing is
$ for a in `cat '/r_wer'`
> do
> lp -d printername $a
> done

But it is giving me an error message.
lp: can't access file "LMN20001"
lp: request not accepted. This is with all the files.
Can somebody Please help me.
Sponsored Links
  #2 (permalink)  
Old 07-08-2001
cfir
Guest
 

Posts: n/a
Bits: 0 [Banking]
You Can Use CGI Script To Do This.



#!/usr/bin/perl

print "Content-type:text/html\n\n";

@files = ("LMN20001", "LMN20002", "LMN20003");

print "@files\n";


  #3 (permalink)  
Old 07-08-2001
Registered User
 

Join Date: Jul 2001
Posts: 62
Alright what if I have around 1000 files then i think just
@files = ("LMN20001", "LMN20002", "LMN20003");
would not be a good idea.

Any other suggestions will be highly appreciated.

Thanks.
  #4 (permalink)  
Old 07-08-2001
Registered User
 

Join Date: Nov 2000
Location: India
Posts: 83
Hi

Just check whether all the files that you are trying to print are in the current directory from where you are issuing this command . if not then give the full path names of the files in the file r_wer
I tried the same thing by making a script file and it worked fine.

for a in `cat './files.txt'`
do
lp $a
done

files.txt is the same as your r_wer.
That's it

Last edited by kapilv; 07-08-2001 at 05:25 AM..
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem with printing rongrout SCO 2 07-23-2008 03:00 PM
Printing problem alfredo HP-UX 2 03-27-2008 05:25 AM
Printing Problem Rosario UNIX for Advanced & Expert Users 0 05-11-2007 01:05 PM
Printing problem Yorgy UNIX for Dummies Questions & Answers 1 01-16-2007 02:23 AM
Printing Problem kapilv IP Networking 3 04-02-2002 10:23 AM



All times are GMT -4. The time now is 06:08 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0