Sponsored Content
Operating Systems AIX Printing a number of copies of a txt file Post 77653 by stebradshaw on Monday 11th of July 2005 11:58:05 PM
Old 07-12-2005
Printing a number of copies of a txt file

Hi,

We have an application running on AIX5.3 that generates text files that are sent to be printed using the lp command.

The user can specify the number of copies they want printed, but only one copy ever gets printed.

I've checked the lp command that is used, and it correctly specifies the -n switch followed by the number of copies.

Is there something in the print queue definitions that prevents multiple copies being printed?

Any help or advice greatfully received.

Thanks, Steve
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

question about printing number of lines in a file

as the title, I had try use "wc -l test.txt" but it give me "<many spaces> 384 test.txt" but the result I want is just "384" could any person can help me that? Thx:( (5 Replies)
Discussion started by: a8111978
5 Replies

2. UNIX for Advanced & Expert Users

lp not printing multiple copies

I'm trying to print multiple copies of a file on sun solaris 8 with the lp -n command to no avail. No matter what numeric value I supply -n, I still only get 1 copy of the file printed. The command I'm using is 'lp -d SNY_IT5000-2 -n2 file' The printer is an HP Laserjet 4000 with a... (2 Replies)
Discussion started by: hassan2
2 Replies

3. AIX

Printing multiple copies via remote queue

Hi all, I have an interesting problem. Using remote queues to print using jetdirect printers I am unable to get a printer to print multiple copies of a print job. command being used: lpr -P -#3 ./test (one copy prints) Also tried: enq -P -C3 ./test (same results) Any ideas? ... (6 Replies)
Discussion started by: Luck
6 Replies

4. UNIX for Dummies Questions & Answers

Printing Multiple Copies

Has anyone come accross and solved an issue where only 1 copy of a doc prints after you use the -n flag and specify more then 1. My exact syntax is lp -dprintername -n3 documentname enq command does same thing. Both commands show the 3 copies in the queue but only 1 ever prints I am using AIX... (0 Replies)
Discussion started by: capeme
0 Replies

5. UNIX for Dummies Questions & Answers

Get the number from the txt file

Hello Guy, I have the following information in the sample.txt, can i get the number and output into sample2.txt - - - - - - - - - - - - - ... (7 Replies)
Discussion started by: happyv
7 Replies

6. Shell Programming and Scripting

ksh program that finds the lowest number in a .txt file

i am having a problem finding the lowest number after punching in a bunch of numbers in the .txt file but its probably the way i have the code set up. help please! (4 Replies)
Discussion started by: tinsteer
4 Replies

7. UNIX for Dummies Questions & Answers

how to generate random number as as the first column of a txt file

Dear all, I have a question. I have a txt file say 4000 rows X 1800 Column. I 'd like to creat a new column as the first column which is a column of random numbers (n=4000) thanks a lot! Lin (2 Replies)
Discussion started by: forevertl
2 Replies

8. Shell Programming and Scripting

Help in printing n number of lines if a search string matches in a file

Hi I have below script which is used to grep specific errors and if error string matches send an email alert. Script is working fine , however , i wish to print next 10 lines of the string match to get the details of error in the email alert Current code:- #!/bin/bash tail -Fn0 --retry... (2 Replies)
Discussion started by: neha0785
2 Replies

9. Shell Programming and Scripting

Linux Commands needed for replacing variable number of spaces with a single , in a txt file

Hi I want to read a text file and replace various number of spaces between each string in to a single "," or any other character .Please let me know the command to do so. My input file is a txt file which is the output of a SQL table extract so it contains so many spaces between each column of the... (2 Replies)
Discussion started by: Hari Prasanth
2 Replies

10. UNIX for Beginners Questions & Answers

Split a txt file on the basis of line number

I have to split a file containing 100 lines to 5 files say from lines ,1-20 ,21-30 ,31-40 ,51-60 ,61-100 Here is i can do it for 2 file but how to handle it for more than 2 files awk 'NR < 21{ print >> "a"; next } {print >> "b" }' $input_file Please advidse. Thanks (4 Replies)
Discussion started by: abhaydas
4 Replies
lp(1)							      General Commands Manual							     lp(1)

Name
       lp - send requests to an LP line printer

Syntax
       lp [-c] [-d dest] [-n number] [-] [files]

Description
       The command arranges for the named files and associated information (collectively called a request) to be printed by a line printer.  If no
       file names are mentioned, the standard input is assumed.  When a file name is designated by a minus sign (-) it	stands	for  the  standard
       input  and may be supplied on the command line in conjunction with named files.	The order in which files appear is the same order in which
       they are printed.

       This command exists for X/OPEN compatibility.

Options
       The following options to may appear in any order and may be intermixed with file names:

       -c	   Makes copies of the files to be printed immediately when is invoked.  Normally, files are not copied, but are  linked  whenever
		   possible.  If the -c option is not given, then the user should be careful not to remove any of the files before the request has
		   been printed in its entirety.  It should also be noted that without the -c option, any changes made to the  named  files  after
		   the request is made but before it is printed are reflected in the printed output.

       -d dest	   Chooses  dest  as  the  printer that is to do the printing.	If dest is a printer, then the request is printed on that specific
		   printer.  By default, dest is taken from the environment variable PRINTER if it is set.  Otherwise, a default destination,  lp,
		   is used.

       -n number   Prints number copies (default of 1) of the output.

Files
       /etc/passwd	      personal identification
       /etc/printcap	      printer capabilities data base
       /usr/lib/lpd*	      line printer daemons
       /usr/spool/*	      directories used for spooling
       /usr/spool/*/cf*       daemon control files
       /usr/spool/*/df*       data files specified in cf files
       /usr/spool/*/tf*       temporary copies of cf files

See Also
       lpq(1), lpr(1), lprm(1), pr(1), symlink(2), printcap(2), lpc(8), lpd(8)

																	     lp(1)
All times are GMT -4. The time now is 04:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy