[plug] saving screen output

Russell Steicke r.steicke at bom.gov.au
Tue Feb 22 20:36:53 WST 2005


On Tue, Feb 22, 2005 at 08:26:29PM +0800, Russ Pitman wrote:
> I need to save the output of a command to a file so it can be included/attached
> to an email message.

I don't know much about exim, but this sounds like a general shell
redirection problem.

> The command is 'exim -d -bt xxxxan at westnet.com.au' which produces approx 
> two pages of output.	
> 
> Running the above with '< eximcmd' appended generates a file 'eximcmd'  
> containing just two lines of text ?

Should that be '> eximcmd' ?  Assuming that it is >, not <, then are
you seeing the other output (other than the two lines in the file) on
your terminal still?  It's likely that output is being written the
standard error output of the process, not the standard output.  If so,
try this

  exim -d -bt xxxxan at westnet.com.au > eximcmd 2>&1

Which will save the stderr output in the same place as the stdout.
The order is important, '> eximcmd' must be before '2>&1'.





-- 
Russell Steicke

-- Fortune says:
Calm down, it's only ones and zeroes,
Calm down, it's only bits and bytes,
Calm down, and speak to me in English,
Please realize that I'm not one of your computerites.



More information about the plug mailing list