Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grab some output only

Status
Not open for further replies.

hokky

Technical User
Nov 9, 2006
170
AU
Hi guys,

I just wanna grab only the stderr only not stdin,

for example
Code:
ls test
no such file in directory --> grab this
ls again
123 test --> don't grab this

I've tried using tee but no luck.
Any idea guys ?

Thanks,
 
ls test >/dev/null

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
sorry, my explanation not clear.

What I mean 'grab' is grab and append in the log file, not only view it.

Thx
 
So, read up on IO redirection...

ls test >/dev/null 2>/path/to/logfile


HTH,

p5wizard
 
OK,

let me explain more

for the stdin :
I want only view in the screen.

but for stderr :
I want view and append in the log file

Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top