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

Answer by Stéphane Chazelas for What does "`_`, `-`, `--` or the empty string...

$ find . -name accept_ra -exec sh -c 'echo 0 > "$1"' inline-sh {} \; inline-sh: ./accept_ra: Permission denied The error message tells you it's an inline-sh that fails to open a ./accept_ra file. $...

View Article


Answer by Stephen Kitt for What does "`_`, `-`, `--` or the empty string is...

The subject of “is used for the shell’s error messages” is “$0”, not “_, -, -- or the empty string”. The value given to $0 is used for error messages; so you shouldn’t specify a meaningless value for...

View Article


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

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 _, -, --...

View Article
Browsing latest articles
Browse All 3 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>