Posts

Showing posts from January 16, 2019

GNU find and masking the {} for some shells - which?

Image
33 11 The man page for GNU find states: -exec command ; [...] The string `{}' is replaced by the current file name being processed everywhere it occurs in the arguments to the command, not just in arguments where it is alone, as in some versions of find. Both of these constructions might need to be escaped (with a `') or quoted to protect them from expansion by the shell. That's from the man to find (GNU findutils) 4.4.2. Now I tested this with bash and dash, and both don't need to have the {} being masked. Here is a simple test: find /etc -name "hosts" -exec md5sum {} ; Is there a shell, for which I really need to mask the braces? Note, that it doesn't depend upon whether the file found contains a blank (invoked from bash):