[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cmp: имя файла с -



Vladimir Zolotykh -> debian-russian@lists.debian.org  @ Sun, 23 Jul 2006 16:23:47 +0300:

 >> Это для zsh.  Для bash (в zsh тоже работает) - "${f##*/}"
 VZ> Работает, спасибо.
 VZ> А где говорится что $() бъется на слова, а ${...} нет ?

В man соответствующего шелла.  В man bash:

       The  order  of expansions is: brace expansion, tilde expansion, parame‐
       ter, variable and arithmetic expansion and command  substitution  (done
       in a left-to-right fashion), word splitting, and pathname expansion.

Ну и, соответственно,

       If the substitution appears within double quotes,  word  splitting  and
       pathname expansion are not performed on the results.

-- 
Artem Chuprina
RFC2822: <ran{}ran.pp.ru> Jabber: ran@jabber.ran.pp.ru

mv /dev/rookie /dev/hands



Reply to: