Newsgroups: comp.sys.sgi
Path: utzoo!utgpu!cunews!nrcnet0!nrccsb3.di.nrc.ca!cantin
From: cantin@nrccsb2.di.nrc.ca (Claude Cantin)
Subject: SUMMARY: lp permissions...
Message-ID: <1991May7.210731.2544@nrcnet0.nrc.ca>
Originator: cantin@nrccsb3.di.nrc.ca
Sender: root@nrcnet0.nrc.ca (Operator)
Nntp-Posting-Host: nrccsb3.di.nrc.ca
Organization: National Research Council, Ottawa, Canada
Date: Tue, 7 May 91 21:07:31 GMT

About ten days ago, I asked if one could print, using "lp", a file
with permissions "700", as

    lp -ddecwriter filename

The consensus is that NO, it cannot be done, but that

    cat filename | lp -decwritter
    lp -ddecwriter < filename

will both work!

One of the replies (Jeff hanson - tohanson@gonso.lerc.nasa.gov) was kind
enough to send the following C-Shell script he had got from (dave Carek,
eddc@opus.lerc.nasa.gov):

    # !/bin/csh
    set last = `echo $#argv`
    set file = $argv[$last] 
    @ x = `echo $#argv` - 1
    set options = `echo $argv | cut -d" " -f1-$x` 
    cat $file | lp $options

You may call that script "/usr/local/bin/tlp" and use that command instead
of "lp", or alias "lp" to "tlp"...

This seems to work fine for me...

Another reply, from Dan Karron (karron@nyu.edu), mentioned that (apparently)
there is a complete rewrite of lp in the next version of IRIX...

Thank you for all who replied,

    Claude Cantin                           tel: (613) 993 0240
    M-60, Chemin Montreal                   FAX: (613) 954 2561
    Conseil National de Recherches Canada   BITNET: cantin@nrcvm01
    Ottawa, Canada (K1A 0R6)                INTERNET: cantin@nrccsb3.di.nrc.ca
-- 
    Claude Cantin			    tel: (613) 993 0240
    M-60, Chemin Montreal		    FAX: (613) 954 2561
    Conseil National de Recherches Canada   BITNET: cantin@nrcvm01
    Ottawa, Canada (K1A 0R6)		    INTERNET: cantin@nrccsb3.di.nrc.ca
