Suppose that I've got the following script called test.sh:#! /bin/sh -printf '%s\n' ${1:?empty or missing argument}When run without any command-line arguments it behaves like this:$ ./test.sh./test.sh: 2: ./test.sh: 1: empty or missing argumentQuestion: Is it possible to change the ./test.sh: 2: part of the error message? 
Is it possible to modify the error message triggered by the parameter expansion using the ${pattern:?word} format?
shell;posix
The answer to your question is 'no'; using that syntax shall output the script, line number, and variable referenced to standard error as you describe.  If you want to alter this, pipe standard error into a process to massage it into your desired format in a script which itself runs the script outputting the error message.