LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-03-2005, 05:58 AM   #1
nevx
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 a.txt....so how do i go about it?
 
Old 05-03-2005, 07:56 AM   #2
apsivam
Member
 
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
Code:
((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.
 
  


Reply


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 12:00 PM
keep the stderror alaios Linux - General 4 08-22-2004 04:51 AM
Look the output of: make dep && make clean bzImage modules modules_install Hell-Shooter Linux - General 2 06-05-2004 06:05 AM
Output & input redirection serotonincy Programming 3 04-12-2004 09:28 AM
how to output stdout to a file SciYro Linux - Newbie 4 02-25-2004 06:08 PM


All times are GMT -5. The time now is 01:16 PM.

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