Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-03-2005, 04:58 AM   #1
LQ Newbie
Registered: May 2005
Posts: 1

Rep: Reputation: 0
stdout & stderror output

i want to display the sterr message on the screen and display both standard output and again the std error in a txt file.
so far i'm up to here

ls yum.conf yp.confz 1>a.txt -->this only displays the stderr on the screen and puts the stoutin how do i go about it?
Old 05-03-2005, 06:56 AM   #2
Registered: Mar 2005
Location: Chennai, India
Distribution: Ubuntu, CentOS
Posts: 72

Rep: Reputation: 15
a bit tricky i figured out with the help of another doc here you go
((ls yum.conf yp.confz anaconda-ks.cfg nofile | tee stdout) 3>&1 1>&2 2>&3 | tee stderr) 2>/dev/null
it saves STDOUT in file stdout STDERR in file stderr then displays STDERR in the console.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CGI programming & stdout nodger Programming 1 04-09-2005 11:00 AM
keep the stderror alaios Linux - General 4 08-22-2004 03:51 AM
Look the output of: make dep && make clean bzImage modules modules_install Hell-Shooter Linux - General 2 06-05-2004 05:05 AM
Output & input redirection serotonincy Programming 3 04-12-2004 08:28 AM
how to output stdout to a file SciYro Linux - Newbie 4 02-25-2004 05:08 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration