bug in viewprt?
Bob Stockler
bob at trebor.iglou.com
Wed May 12 12:50:35 PDT 2004
On Wed, May 12, 2004 at 02:13:07PM -0400, Jay R. Ashworth wrote:
| On Wed, May 12, 2004 at 02:20:46PM -0400, Bob Stockler wrote:
| > On Wed, May 12, 2004 at 12:52:31PM -0400, Jay R. Ashworth wrote:
| > | I believe I've discovered a design deficiency in viewprt.
| > |
| > | Apparently, in certain circumstances, filepro creates -p output files
| > | which are not readable by the general public. For some reason, while
| > | the less command spawned by viewprt can read them (it apparently
| > | inherits viewprt's EUID), lp pukes because it cannot (a permission
| > | error). I believe this is because it's the lp *unspooler* program,
| > | which runs as user lp, that tries to open said file. I saw two
| > | possible solutions: chmod the temp file inside viewprt, or modify
| > |
| > | lp -n $print $dir/$file
| > |
| > | into
| > |
| > | cat $dir/$file | lp -n $print
| >
| > Useless use of "cat" #50,999,999. Replace with:
| >
| > <$dir/$file lp -n $print
|
| Some shells won't interpret variables as the argument of a redirection
| (specifically, older SCO shells), and in any event, put the redirection
| on the *right*, Bob. :-)
On Tandy 6000 Xenix, SCO Xenix 2.3.4, SCO UNIX 3.2v4.2, and every
system I've used since then, /bin/sh has _always_ interpreted
variables used with redirection (to or from them) properly.
You may be confusing the use of a redirection symbol itself _within_
a variable, in which case you have to use "eval" to get the shell to
read the line twice in order to get _that_ to work.
And, in this case, I like the redirection on the left, showing the
left-to-right flow of the data from the file to the "lp" command
(but that's a matter of taste, as the shell doesn't care about the
position - or order, if there's both a < and > on the line - of the
redirections).
Bob
--
Bob Stockler - bob at trebor.iglou.com
Author: MENU EDIT II - The BEST Creator/Editor/Manager for filePro User Menus.
Fully functional (time-limited) demos available by email request (specify OS).
More information about the Filepro-list
mailing list