Mar 6, 2007 #1 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,
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,
Mar 6, 2007 #2 PHV MIS Nov 8, 2002 53,708 FR 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 Upvote 0 Downvote
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
Mar 6, 2007 Thread starter #3 hokky Technical User Nov 9, 2006 170 AU sorry, my explanation not clear. What I mean 'grab' is grab and append in the log file, not only view it. Thx Upvote 0 Downvote
sorry, my explanation not clear. What I mean 'grab' is grab and append in the log file, not only view it. Thx
Mar 6, 2007 #4 p5wizard IS-IT--Management Apr 18, 2005 3,165 BE So, read up on IO redirection... ls test >/dev/null 2>/path/to/logfile HTH, p5wizard Upvote 0 Downvote
Mar 6, 2007 Thread starter #5 hokky Technical User Nov 9, 2006 170 AU 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, Upvote 0 Downvote
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,
Mar 6, 2007 #6 feherke Programmer Aug 5, 2002 9,540 RO Hi You could already combine the previous suggestions... Code: ls [green][i]whatever[/i][/green] 2>> /dev/null Feherke. http://rootshell.be/~feherke/ Upvote 0 Downvote
Hi You could already combine the previous suggestions... Code: ls [green][i]whatever[/i][/green] 2>> /dev/null Feherke. http://rootshell.be/~feherke/