Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Redirecting UNIX Print Output Post 42207 by Neo on Thursday 23rd of October 2003 07:08:28 PM
Old 10-23-2003
printcap

Try reading your man page on printcap and see if that helps you get started:



Quote:
NAME
printcap - printer capability data base

SYNOPSIS
printcap database

DESCRIPTION
The format of the LPRng printcap database was based on the termcap(5) data
base file format. Entries in the printcap Each entry in the data base is
used to define various options and values to control the printing and
spooling of print jobs.

LPD.CONF, SYSTEM AND USER PRINTCAP FILES
Default configuration values are read from the LPRng configuration file
/etc/lpd.conf, consult the lpd.conf(5) man page for details about them.
The system printcap file /etc/printcap contains information common to all
users and the LPRng printing system. Finally, the user printcap files is
in ${HOME}/.printcap and contain user configurable information for printer
information. The values in the user printcap file override values in the
printcap file which override the default values in the /etc/lpd.conf file.

The user printcap file is used by client programs such as lpr , lprm , lpq
, and lpq to allow the user to define either a special set of printers,
provide additional configuration information, or to modify default set-
tings in the /etc/printcap, or /etc/lpd.conf file.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

redirecting the output of aspell

Hi, I have 2 identical servers both running aspell but for some reason I can't redirect the output to a file on one of them. This is what I'm trying to do: echo feck | aspell -l > errors.txt On one machine this works fine but the other it doesn't (the file is created but it is empty). ... (6 Replies)
Discussion started by: leekb
6 Replies

2. Shell Programming and Scripting

Redirecting OUTPUT

Hi, I want to move the output of a command/script to a file as well as to to be displayed on stdout. Can anybody help me in this. Thanks in advace .. -Chanakya M (1 Reply)
Discussion started by: Chanakya.m
1 Replies

3. Shell Programming and Scripting

Redirecting output to file

Hi, Below is the whole string which is to be redirected to the new file. su - oracle -c "exp $user/$pass file=/oracle/oradata/backup/exp_trn_tables_`date +%d_%b_20%y_%H_%M_%S`.dmp log=/oracle/oradata/backup/exp_trn_tables_`date +%d_%b_20%y_%H_%M_%S`.log tables=table1,table2 statistics=none" ... (3 Replies)
Discussion started by: milink
3 Replies

4. Shell Programming and Scripting

Reading UNIX commands from file and redirecting output to a file

Hi All I have written the following script: #!/bin/ksh while read cmdline do echo `$cmdline` pid="$cmdline" done<commands.txt =========== commands.txt contains: ps -ef | grep abc | grep xyz |awk '{print $2}; My objective is to store the o/p of the command in a variable and do... (8 Replies)
Discussion started by: rahulparo
8 Replies

5. Solaris

Redirecting print to optional output bins

Guys We have a HP P4015 laserjet printer with a 5 bin mailbox attached & configured. We can print to the specific output bins from Oracle e-Business suite, however our print output format is incompatible so it prints out random characters instead of the letter content. I have looked... (2 Replies)
Discussion started by: s1977
2 Replies

6. Shell Programming and Scripting

redirecting output using if-then-else in awk

I am trying to filter records based on number of "|", delimiter in my application. If number of "|" is greater than 14 its a bad record, else its a good record. I have to redirect output to two different files based on the if-then-else evaluation in AWK. if number of “|” in file_0 > 14 ... (2 Replies)
Discussion started by: siteregsam
2 Replies

7. Shell Programming and Scripting

Redirecting the output

For example, if we run the below command, symcfg list -thin -pool , results in an output most of the times and if the out is generated i'm able to redirect the output to a file. but sometimes it doesnt result any output and even though the output is being redirected, i can see "No Thin Pools "... (2 Replies)
Discussion started by: web2moha
2 Replies

8. Shell Programming and Scripting

Awk: Print Error While Redirecting output in multiple Files

Hi, I have a following code in which I am unable to redirect to multiple files. Can anybody please help with some corrections awk -F, '{ if ( substr($1,26,2)=="02" && substr($1,184,14)=="MTSCC_VALFIRST") { array1++ array2++ array3++ } else if (substr($1,26,2)=="03" &&... (4 Replies)
Discussion started by: siramitsharma
4 Replies

9. Shell Programming and Scripting

Redirecting output to file

Hi, I have created script which redirect the output to file.I am able to get the output in file but not in the format. Output :Content of the log which have 10 -15 lines. Actal :Line1 ..Line 2Line3 Line4 Line 5 Expected:Line1 Line 2 Line3 Please... (7 Replies)
Discussion started by: karthik771
7 Replies

10. Shell Programming and Scripting

Redirecting output using if with awk

I have this line were I am selecting some fields from one file and creating a new file for the selected data. awk -F "\"*,\"*" '{print $1"," $2}' folderone/list.txt > folderone/qlist.txt This works, but then from this new file I want it to create a new file where it separates data: $2 >5 it... (2 Replies)
Discussion started by: rluna
2 Replies
LPF(1)							      General Commands Manual							    LPF(1)

NAME
lpf - general printer filter SYNOPSIS
lpf -Pprinter -wwidth -llength -xwidth -ylength [ -c ] -Kcontrolfilename -Lbnrname [ -iindent ] [ -Zoptions ] [ -Cclass ] [ -Jjob ] [ -Rac- cntname ] -nlogin -hHost -Fformat [ -T[crlf,debug] -Dlevel ] [ affile ] DESCRIPTION
Lpf is a general printer filter. Usually it is used as filter in the printcap file and is called by lpd. The -Tcrlf option will suppress translation of LF to CR/LF pairs. The -Tdebug option will increment the debug level. The following options passes lpd by default: -Pprinter The name of the printer. -wwidth The page width in chars, as given in the :pw field in the printcap file -llength The page length in lines, as given in the :pl field in the printcap file -xwidth The page width in pixels, as given in the :px field in the printcap file -ylength The page length in pixels, as given in the :py field in the printcap file -Kcontrolfilename The name of the control file. -Lbnrname The banner name. This is set by the lpr -T option. -nlogin The user login name. -hHost The host where the job was submitted. -Fformat The job format from the lpr -F option or other option. These options are optionally set by lpd: -Zoptions Extra options. They are passed from the -Z parameter given on the lpr command command line and can be interpreted by the filter. These remaining options can be added to the filter entry in the printcap file: -c ignore control characters, set by lpr -b (binary) or -l (literal) options. -iindent The indentation amount, set by lpr -i indent option. -Cclass The class name, set by lpr -C class option. -Jjob The job name, set by lpr -J job option. -Raccntname The name of the accounting file, from printcap information. -Dlevel Sets debug level. The level must be an integer, a nonzero value switches debugging on. -Tcrlf Turn LF to CR/LF translation off. -Tdebug Increment the debug level. EXIT STATUS
The following exit values are returned: zero (0) Successful completion. non-zero (!=0) An error occurred. FILES
The files used by LPRng are set by values in the printer configuration file. The following are a commonly used set of default values. /etc/lpd.conf LPRng configuration file ${HOME}/.printcap user printer description file /etc/printcap printer description file /etc/lpd.perms permissions /var/run/lpd lock file for queue control /var/spool/lpd spool directories /var/spool/lpd/QUEUE/control queue control /var/spool/lpd/QUEUE/log trace or debug log file /var/spool/lpd/QUEUE/acct accounting file /var/spool/lpd/QUEUE/status status file SEE ALSO
lpd.conf(5), lpc(8), lpd(8), lpr(1), lpq(1), lprm(1), printcap(5), lpd.perms(5), pr(1), lprng_certs(1), lprng_index_certs(1). DIAGNOSTICS
Most of the diagnostics are self explanatory. If you are puzzled over the exact cause of failure, set the debugging level on (-D5) and run again. The debugging information will help you to pinpoint the exact cause of failure. HISTORY
LPRng is a enhanced printer spooler system with functionality similar to the Berkeley LPR software. The LPRng mailing list is lprng@lprng.com; subscribe by sending mail to lprng-request@lprng.com with the word subscribe in the body. The software is available from ftp://ftp.lprng.com/pub/LPRng. AUTHOR
Patrick Powell <papowell@lprng.com>. LPRng LPRng-3.9.0 LPF(1)
All times are GMT -4. The time now is 08:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy