printcap printer -> email account script/filter help


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers printcap printer -> email account script/filter help
# 1  
Old 11-07-2008
printcap printer -> email account script/filter help

the basics: Tru64 unix 5.1b on alpha
have nail(now mailx), mail, and mailx(old version) available.

I'm trying to make a print filter to take a file that is printed to a specific printer in my printcap file and email it.

I put this in my printcap:

emailprinter:\
:lp=/dev/null:sh:mx#0:\
:sd=/var/spool/lpd/emailprinter:\
:lf=/var/log/emailprinter:\
if=/usr/shared/printfilter/emailprinter.filter:

I need to make the emailprinter.filter script to take the input from:
lp -d emailprinter /some/file.txt and send it to an email address.


any ideas?

Thanks in advance.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Need output in one line and filter servers, which has account expired or password exipred

I have 500 servers, in which I am looking to get hostname and password length information. when I am trying to run script(which I build), in which shows output in one line below and asking to reset password and also some of the servers does not give output. Please help #!/bin/bash for... (9 Replies)
Discussion started by: yash_message
9 Replies

2. Windows & DOS: Issues & Discussions

What happens to your skype account if you close outlook.com email account?

Hello, Does anyone know what happens to your skype account if you close the outlook.com email account which are linked together? As you know they are both owned by Microsoft. Thanks (0 Replies)
Discussion started by: milhan
0 Replies

3. Forum Support Area for Unregistered Users & Account Problems

Restart old account, change email for account

Hi there, I may have had a typo in my email previously provided. I have doublechecked my email for Scott's reply but havent seen it, so I am creating a new post. My new email can be either one of these: <removed> or <removed> I beleive my old email was <removed by admin> thanks for your... (1 Reply)
Discussion started by: AKelam_MagnusA
1 Replies

4. Shell Programming and Scripting

Filter data and send email

Need script....We get sar file sa15 with 7 days data which gets appended.. we want filter and parse the outptu such that we should filter only last 48 hours data and then email it to out team. we read -- sar -f sa15 Please help me with the script either by use sar itself or even sar and awk... (10 Replies)
Discussion started by: noorm
10 Replies

5. Shell Programming and Scripting

Printer filter - convert to ps then to pdf

Hi, I currently have a driver located in /etc/cups/interfaces that does the following: job="$1" user="$2" title="$3" numcopies="$4" options="$5" filename="$6" # Set up printer default modes echo -e "\033E\c" echo -e "\033)0B\c" cat "$filename" So then I want to do something... (2 Replies)
Discussion started by: stuaz
2 Replies

6. UNIX Desktop Questions & Answers

printer/filter setup

trying to get my laserjet to print under FC5. Got APSFILTER; what to answer to question 'parallel or serial printer port when it is USB? Do I need an updated filter software? I tried 'parallel', get 'permission denied when I try lp or lpr command- thanks- Marshall (2 Replies)
Discussion started by: blann
2 Replies

7. AIX

AIX printer filter

I am trying to setup remote printer queues on a AIX 5.2 system that sends all print requests through a filter by default. The application that is running on the LPar is coded to call the lp command to produce a print. Ideally I would like a single queue per remote printer to pass the data... (4 Replies)
Discussion started by: blacksm
4 Replies

8. UNIX for Advanced & Expert Users

email account on subhost

Hai i need to create an email account for subhost... I tried creating an unix user account... But the adduser (or) useradd command is not working in subhost login even when i entered with the root login of the subhost... If i create unix user account with root login of host, then the mail... (1 Reply)
Discussion started by: collins
1 Replies

9. UNIX for Dummies Questions & Answers

email account for subdomain (HOW-TO)

Hai i need to create an email account for subhost... I tried creating an unix user account... But the adduser (or) useradd command is not working in subhost login even when i entered with the root login of the subhost... If i create unix user account with root login of host, then the mail... (1 Reply)
Discussion started by: collins
1 Replies

10. Programming

email account

Dear All Mine is a shared hosted domain name say mydomain.com service.. I would like to create email account info@mydomain.com through a program.. I am running on redhat linux 8. I have been asking a lot... Please somebody help me in this issue.. or recommenfd me any book which explains the... (3 Replies)
Discussion started by: collins
3 Replies
Login or Register to Ask a Question
cp382dof(8)						      System Manager's Manual						       cp382dof(8)

NAME
cp382dof - Filter for Traditional Chinese CP382 printer controller SYNOPSIS
/usr/lbin/cp382dof [-c] [-h host] [-i indent] [-l length] [-L locale] [-n login] [-w width] [accounting_file] OPTIONS
Prints control characters. Specifies the host name of the job owner. Specifies the amount of indentation. The default value is no (no indentation). Specifies the page length in lines. The default value is 66. Specifies the printer codeset. This value must be a valid locale name. The default value is zh_TW.dechanyu. Specifies the login name of the job owner. This name can contain Chinese characters. Specifies the page width in columns. The default value is 132. OPERANDS
Specifies the file to record accounting information. This file can contain Chinese characters. DESCRIPTION
The cp382dof filter is used to filter text data destined for the CP382 printer controller. The filter handles the device dependencies of the printers and performs accounting functions. At the time of completion for each print job, accounting records are written to the file specified by the af field of the printer's entry in /etc/printcap. The filter can handle plain ASCII and Chinese text files and files that have been preprocessed by nroff. The cp382dof filter translates nroff control sequences for underlining, superscripting, and subscripting into the proper CP382 control sequences. The cp382dof filter can be the specified filter in both the of and the if fields in the /etc/printcap file. For further information, see printcap(4). The CP382-D printer can be configured to use the software on-demand loading (SoftODL) mechanism to print user-defined characters (UDCs). Refer to i18n_printing(5) for more details on SoftODL. To enable SoftODL printing, you should set the ys value in /etc/printcap to 800. You can also set the default SoftODL database, style, and size by using the odldb and odlstyle options in the ya value. The yt value, if set, should be fifo. Refer to printcap(4) for information on setting these values. NOTES
The lpr command supports a number of options and associated options to specify localization features supported by various printers. The lpr(1) reference page provides a complete list of these options and options. The following ones can be specified for the CP382 printer controller: To specify the SoftODL database path To specify SoftODL font style and size RESTRICTIONS
The cp382dof filter always assumes that 4-byte characters are printed without leading code. The printer hardware should be set as such to avoid any formatting problems. ERRORS
The lf field (default value is /dev/null) in the /etc/printcap file specifies the name of the error logging file. SEE ALSO
Commands: lpd(8), lpr(1), pr(1), pac(8) Files: printcap(4) Others: i18n_printing(5) cp382dof(8)