Powered by Invision Power Board


  Reply to this topicStart new topicStart Poll

> Blocking the error stream, Blocking error stream in shell script
dipukutty
Posted: May 31 2005, 08:45 AM
Quote Post


Newbie
*

Group: Members
Posts: 1
Member No.: 1027
Joined: 31-May 05



Hello,
I want to block all the error stream (2) of a shell script and output only the stdout to the console.

Example:
In the command "find / -type f " I can block the error by "find / -type f 2>/dev/null". In this case only the output will be printed to the screen. Now If I have about 100 such lines with the posibility of errors then I don't want to individually dump the error stream of each command.

I am looking for a method to block the error stream totally and only looking for a success output. I am using bash shell.

Also I dont want to do "script.sh 2>/dev/null"

Thanks in advance
Regards

PMEmail Poster
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | Shells & Scripting | Next Newest »

Topic Options Reply to this topicStart new topicStart Poll

 



[ Script Execution time: 0.4961 ]   [ 12 queries used ]   [ GZIP Enabled ]




Partners: Cambridge Plus :: <Link Available> :: Electronic Circuit Design :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum