Учитывая, что у меня есть установленная доля, скажем:
/Volumes/temp
Это может соответствовать
cifs://servername/temp
Используя bash, как получить сетевой путь к файлу на общем ресурсе, например
/Volumes/temp/folder/file.txt
 Если я правильно понимаю ваш вопрос, вы хотите заменить начало пути. Вы можете сделать это следующим образом:
file='/Volumes/temp/folder/file.txt'
echo ${file/#\/Volumes/cifs://servername}
Это описано в man bash:
   ${parameter/pattern/string}
          Pattern substitution.  The pattern is expanded to produce a pat‐
          tern 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 begin‐
          ning of the expanded value of parameter.  If pattern begins with
          %, it must match at the end of the expanded value of  parameter.
          [...]