On Wed, May 22, 2019 at 05:34:22PM +0000, Charles-Henri Gros wrote: [cut] > The problem I'm trying to solve is to iterate over regex-escaped file > names obtained from a "find" command. I don't know how to make this > work. It works with other versions of bash and with other shells. > > The original is closer to something like this: > > for file in $(find ... | sed 's/\$/\\$/g'); do grep -e "$file" > someinput; done
You may want to use "grep -F" to match fixed strings (not regular expressions): find ... -exec grep -F -e {} someinput \; Add -x to grep if you want full line matches only. Tis is assuming you'd want to look for the found pathnames in "someinput". > > It used to work. Now it doesn't. I do not know how to make it work again. > > > -- > Charles-Henri Gros > -- Kusalananda Sweden