I have a set of
txt files whose names may contain space or special characters like
I have a
grep -L "cannot have" $(grep -l "must have" *.txt) to list all the files who have
must have but not
For instance, there is a file
abc defg.txt which contains only 1 line:
So normally the grep solution should find out
abc defg.txt, but it returns:
grep: abc: No such file or directory grep: defg.txt: No such file or directory
I think for filenames containing
#, the grep solution is also invalid.
Could anyone help me amend the grep solution?