man bash
Parameter Expansion
${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 omit‐
ted. If parameter is @ or *, the substitution 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.
takze jde o formu kde pattern zacina /, cili se nahradi vsechny vyskyty, pattern je (oescapovana) uvozovka a string chybi, tudiz muze chybet i lomitko pred nim
vysledek je hodnota number (nebo text) s odstranenyma uvozovkama
do pole to strci jako jednu polozku number (prvni slovo na radku), jako druhou polozku cely zbytek radku, jako jedno slovo (proto je ten ${..} v uvozovkach) a odstrani to pripadne uvozovky ze vstupu, aby se ta struktura nerozbila