On Mai 22 2019, Charles-Henri Gros <charles-henri.g...@synopsys.com> wrote:
> The file name is the regex (argument to "-e"), not the file "grep" > reads. I want to check that some text file contains a reference to a file. > > But it looks like this would work: > > for file in $(find ...); do grep -e "$(echo -n "$file" | sed 's/\$/\\$/g')" > someinput; done Use grep -F instead. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."