Results 1 to 1 of 1
Hi All,
I want to inversely grep the output with a specified string.
But, I know about "grep -v" option.
For example, see the below sample text with contains No ...
- 08-24-2010 #1Just Joined!
- Join Date
- Aug 2010
- Posts
- 1
how to grep output with out "No such file or directory"
Hi All,
I want to inversely grep the output with a specified string.
But, I know about "grep -v" option.
For example, see the below sample text with contains No such file or directory.
<76 /resd/csxmig/linux2/personal/donkada/CSX/ngd > cat ajay2.txt
grep: ate/master/CVS: No such file or directory
grep: ate/master/CVS: No such file or directory
grep: ate/master/CVS: No such file or directory
output this text
grep: ate/master/CVS: No such file or directory
grep: ate/master/CVS: No such file or directory
If I want to grep the output with out "No such file or directory", I am able to do it as:-
<77 /resd/csxmig/linux2/personal/donkada/CSX/ngd > cat ajay2.txt | grep -v "No such file or directory"
output this text
NOTE: This is to confirm I am aware of "grep -v" option.
Now, coming to the real problem...
While searching my codebase for a string, I was getting lot of "No such file or directory" entries in the output. Its really annoying.
So, I used the above "grep -v" option, But still the output is not filtered from "No such file or directory". Any idea?
But, when I am using the similar pattern during my search
<78 /resd/csxmig/linux2/personal/donkada/CSX/ngd > grep -nri "TSL form has been timed out" * | grep -v "No such file or directory"
grep: ate/CVS: No such file or directory
grep: ate/ate_enq_ex_and_doc/CVS: No such file or directory
grep: ate/html/CVS: No such file or directory
grep: ate/master/CVS: No such file or directory
grep: ate/master/AteDb/CVS: No such file or directory
grep: ate/master/scripts/CVS: No such file or directory
Appreciate your help.


Reply With Quote