Quantcast
Channel: What does "`_`, `-`, `--` or the empty string is used for the shell's error messages" mean? - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 3

What does "`_`, `-`, `--` or the empty string is used for the shell's error messages" mean?

$
0
0

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 (like sh or find-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.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images