On Fri, Jul 06, 2001 at 10:13:22PM +1000, Jeff Waugh wrote:

> Which works great! So, second question. I need to use what's going on in
> stdin twice in a script, so I'm currently doing this:
> 
>   STDIN=$(tee -a pantslog)
>   ...
>   echo $STDIN | mail [EMAIL PROTECTED]

i'm not quite sure what you want to do here.  you want to read input from
stdin, have it echoed out to the user again, and store it in the file too?

looks like your approach works, although i'd be inclined to do

    STDIN=$(tee -a pantslog)    # you sure you don't want cat > pantslog?
    mail [EMAIL PROTECTED] < pantslog

or just

    tee -a pantslog | mail [EMAIL PROTECTED]

just because i don't trust 'echo $variable's that much :)

(i have the feeling that the last option may be the one you want?)


-- 
#ozone/algorithm <[EMAIL PROTECTED]>          - trust.in.love.to.save

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to