[user@fedora_22 ~]$ augpath=":$PATH:"
[user@fedora_22 ~]$ augdir=":/usr/bin:"
[user@fedora_22 ~]$ test "$augpath" != "${augpath/$augdir}" && echo Found || echo NotFound
An easy way to see if a directory is already on your path is to wrap both the directory name and the PATH variable with a leading and trailing colon (:) and test whether the delimited directory name is part of the delimited PATH. If you don’t delimit in this way, you might be testing for /bin and actually find /usr/bin, which contains the string /bin. Use shell brace expansion to remove a string from a parameter and then compare the result with the original. Listing 27 shows the basic constructs you could use. - поясняющий текст
"${augpath/$augdir}"
выяснил что удаляет из вывода :/usr/bin/: Не могу понять каким образом.Почему $ перед {. Как вообще это работает