So, the thing is, I'm on linux terminal using grep command and I want the output without all the lines where it prints at the beginning "grep:" or the lines that begins with "./", because now I'm getting something like this:
grep: ./users/blabla1: Permission denied
grep: ./users/blabla2: Permission denied
grep: ./users/blabla3: Permission denied
grep: ./users/blabla4: Permission denied
grep: ./users/blabla5: Permission denied
grep: ./users/blabla6: Permission denied
grep: ./users/blabla7: Permission denied
grep: ./users/blabla8: Permission denied
./foo/bar/log.log
./foo/bar/xml.xml
I have tried this:
grep -irl "foo" . | grep -v "Permission denied"
I have also tried this one:
grep -irl "foo" . | grep -v "^grep:"
And finally this one:
grep -irl "foo" . | grep "^./"
But I keep getting same results as if I haven't put anything after the |, any ideas? What am I missing?