From https://unix.stackexchange.com/a/156010/674
Note that the second
sh
above goes into the inline script's$0
. You should use something relevant there (likesh
orfind-sh
), not things like_
,-
,--
or the empty string as that is used for the shell's error messages:$ find . -name accept_ra -exec sh -c 'echo 0 > "$1"' inline-sh {} \; inline-sh: ./accept_ra: Permission denied
What does "_
, -
, --
or the empty string is used for the shell's error messages" mean?
Why does using inline-sh
not work in the example, given that inline-sh
is not _
, -
, --
or the empty string?
Thanks.