SUMMARY: Redirecting output to mail AND printer in one go.

From: bwalker@sfa.org.uk
Date: Wed Jan 28 1998 - 08:12:58 CST


Thanks to :

Alexandre Peixoto Ferreira <alexandre.ferreira@flug.com.br>
wfrank@syskonnect.de (Werner Frank)
Stephen Frost <sfrost@mitretek.org>
Frederic Piard <Frederic.Piard@erli.fr>
dan@paradyne.com
Scott MacDonald <scott@msi-uk.com>
Claus Assmann <ca@informatik.uni-kiel.de>
m.atkinson@csl.gov.uk
John Wynstra <john@its.brooklyn.cuny.edu>
sagray@amp.com (Steve Gray)
"Brian T. Wightman" <wightman@acm.org>
Anderson McCammont <and@ms.com>
"Iskander, Tim" <ISKANDER@infimed.com
Marcos Assis Silva <assis@uel.br>
Chris Tubutis <tubutis.chris@tci.com
"Christopher L. Barnard" <cbar44@tsg.cbot.com>
Stuart.Little@dpcs-sw.co.uk

All or most of whom suggested the tee command to create a temporary
file.
I had thought of this but thought it a little messy - which most people
agreed was the case. But it does do the job !.

Thanks to you all for your rapid suggestions.

Some samples :

*********************************************************************
(. .profile; get_trades_loaded | tee /tmp/file | lp -d lj4si-1a -n 2;
mailx -s whatever whomever </tmp/file; rm /tmp/file) >/dev/null 2>&1

Rather crude of me to use a file, but when all else fails, tried & true.

-- john l. wynstra
*********************************************************************
35 07 * * 2-6 ( . .profile; get_trades_loaded | tee /tmp/$$ | lp -d
lj4si-1a -n 2; mail somebody </tmp/$$; rm /tmp/$$ )
>/dev/null 2>&1

I don't know of a way to do it without the file I'm afraid.

Matthew Atkinson
*********************************************************************
You can use the tee command to create a file and mail that file, like:

35 07 * * 2-6 ( . .profile; get_trades_loaded | tee /tmp/tempfile | lp -d
lj4si-1a -n 2; mail -s "subject" user < /tmp/tempfile; rm /tmp/tempfile )

Regards

 ____________________________________
  
              Bill Walker
           
           bwalker@sfa.org.uk
        Tel: UK+(0)171 378 5775
    Securities and Futures Authority
            London, England
  ____________________________________



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:30 CDT