see man bash, that will help you to understand (but definitely not an easy case):
Code:
A double-quoted string preceded by a dollar sign ($"string") will cause the string to be translated according to the current locale. If
the current locale is C or POSIX, the dollar sign is ignored. If the string is translated and replaced, the replacement is double-
quoted.
From this part you will know it is
${@// /\\ } inside
$"<string>". Next:
Code:
${parameter/pattern/string}
Pattern substitution. The pattern is expanded to produce a pattern just as in pathname expansion. Parameter is expanded and the
longest match of pattern against its value is replaced with string. If pattern begins with /, all matches of pattern are
replaced with string. Normally only the first match is replaced. If pattern begins with #, it must match at the beginning of
the expanded value of parameter. If pattern begins with %, it must match at the end of the expanded value of parameter. If
string is null, matches of pattern are deleted and the / following pattern may be omitted. If parameter is @ or *, the substitu‐
tion operation is applied to each positional parameter in turn, and the expansion is the resultant list. If parameter is an
array variable subscripted with @ or *, the substitution operation is applied to each member of the array in turn, and the expan‐
sion is the resultant list.
here parameter is @, pattern begins with / and contains a single space, string is a backslash and a space, so actually it will add a backslash before all the spaces in $@.
see also:
Code:
Special Parameters
@ Expands to the positional parameters, starting from one. When the expansion occurs within double quotes, each parameter expands
to a separate word. That is, "$@" is equivalent to "$1" "$2" ... If the double-quoted expansion occurs within a word, the
expansion of the first parameter is joined with the beginning part of the original word, and the expansion of the last parameter
is joined with the last part of the original word. When there are no positional parameters, "$@" and $@ expand to nothing (i.e.,
they are removed).