When bash is interpreting a script and encounters
${arg?error message}
when arg is unset, the script terminates after printing the error message. Unfortunately, bash prepends “$0: line $LINENO: arg:” to the error message. Is it possible to suppress the additional information? I would like the error message to be exactly “error message”.
You probably have to avoid the
${PARAMETER?WORD}construct and do it manually. For example, something like