This is not too hard to figure out. You just have to know a bit about print filters.
Options: I have posted a step by step at the following web site: http://linux-sxs.org/index2.html Go there and search for filters hammer, and you will get a useful primer on print filters. OR You could post your print filter and a short sample file and I'll look at it and see if there is a way to identify the file with the file command, the first line of the file, or a suffix. OR you could just invoke the script and send the output to your print spooler, sorta like: enscriptRuby FileToPrint | lpr might work This might be your easiest option. Joel > I have several bash scripts that invoke enscript . How might I set up LPRng > to automatically detect extensions and invoke this script? e.g. I run the > script below to pretty print Ruby source (text) files: > > $ cat /usr/bin/enscriptRuby > #!/bin/sh > > exec enscript -b '$N|%W|Page $% of $=' \ > --tabsize=4 \ > --pretty-print=ruby \ > --margins=60:60:60:60 $1 \ > --line-numbers > > Thanks ahead for any help. > > Albert > > > ----------------------------------------------------------------------------- > YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST > The address you post from MUST be your subscription address > > If you need help, send email to [EMAIL PROTECTED] (or lprng-requests > or lprng-digest-requests) with the word 'help' in the body. For the impatient, > to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] > with: | example: > subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] > unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] > > If you have major problems, send email to [EMAIL PROTECTED] with the word > LPRNGLIST in the SUBJECT line. > ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST The address you post from MUST be your subscription address If you need help, send email to [EMAIL PROTECTED] (or lprng-requests or lprng-digest-requests) with the word 'help' in the body. For the impatient, to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] with: | example: subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] If you have major problems, send email to [EMAIL PROTECTED] with the word LPRNGLIST in the SUBJECT line. -----------------------------------------------------------------------------
