I'm wondering if it is possible to include empty curly braces {}
inside a sed
replacement called from a find -exec
.
An example:
find "$dir" -type f -name "*" -exec sed -i s/hello{}a/hello{}b/g '{}' +
This brings up the error message of duplicate {}
:
find: Only one instance of {} is supported with -exec ... +
Is there a way to keep {}
in the sed
command and to be seen as literals, not as replacements for the files that find
finds?
{}
, and-name "*"
is superfluous.