I googled and tried so many things and could never get anything to work with $ {parameter @operator}. All I find is more links to the same documentation. Therefore, I believe that the correct answer with practical examples will be very useful for understanding it.
The documentation says:
$ {parameter @operator}
Decomposition is either a conversion of the value of a parameter or information about the parameter itself, depending on the value of the operator. Each statement is a single letter:
Q
An extension is a string that is a parameter value specified in a format that can be reused as an input.
It also talks about quoting:
3.1.2. Quoting is used to remove the special meaning of certain characters or words in a shell.
So, my reasoning is that the output of this (special character $):
a="To be reused as an input string, \$0 needs to be quoted"
echo ${a@Q}
should be like this (between "," \ "it is deleted, so for reuse you need to use for input):
To be reused as an input string, \$0 needs to be quoted
but I get:
bash: ${a@Q}: bad substitution
I tried different combinations:
${a@q}, "${a@Q}", a='To be reused as an input string, $0 needs to be quoted'
to no avail.
In fact, any operators I try to use always give a bad replacement error. These seem to be very obscure features of bash. I missed from this post about half an hour of attempts, each of which is more twisted than the previous one!