Separate stdout and stderr

David SMITH dave.smith at st.com
Fri Jun 26 17:02:49 CEST 2009


On Tue, Jun 23, 2009 at 10:37:03PM -0700, littleBrain wrote:
> And I see, error and the decrypted message (stdOut??)  is spewed out in the
> body.
> 
> I would like to separate these error messages to bottom of the message and
> standard decrypted output to the top of the body.
> 
> Could someone please help me to use some command or a shell script to
> achieve this?
> 
> Any help would be highly appreciated...

Yes, this is a "feature" of UNIX filehandle buffering.

I guess it depends on what you're trying to do.

For example; assuming you are using Bourne shell, you can redirect stdout
and stderr separately:
  my_command 1> stdout_goes_here.txt 2> stderr_goes_here.txt

Otherwise, you need to be a bit more specific as to exactly what you want
to do (and which shell you're running in).

-- 
David Smith        | Tel: +44 (0)1454 462380    Home: +44 (0)1454 616963
STMicroelectronics | Fax: +44 (0)1454 462305  Mobile: +44 (0)7932 642724
1000 Aztec West    | TINA: 065 2380          GPG Key: 0xF13192F2
Almondsbury        | Work Email: Dave.Smith at st.com
BRISTOL, BS32 4SQ  | Home Email: David.Smith at ds-electronics.co.uk



More information about the Gnupg-users mailing list