Hello,
Under one directory, I can use below command to find out the file names with string "Export terminated successfully without warnings"
grep -i -l "Export terminated successfully without warnings" *.*
My question is : how I find out the file names without including string
"Export terminated successfully without warnings"
Thank you
Jerry
I am unclear on your question.
You want to search for files containing a specific string without using that string in the command?
Thanks for response.
I am sorry for confusing.
I want to find out the files without containing a specific pattern (like example here:"Export terminated successfully without warnings")
Thank you
Jerry
Try this.
for file in `ls`
do
if (`grep -i -l "Export terminated successfully without warnings" $file` == "")
print $file
done
Or this
find . -type f -exec grep -v -H "Export terminated successfully without warnings" {} \;
sorry,seems like above command won't work