Vladimir Zolotykh -> [email protected]  @ 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: [EMAIL PROTECTED]

mv /dev/rookie /dev/hands


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Ответить