Afficher un message
Vieux 26/03/2008, 20h28   #3
Stephane CHAZELAS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: changing part of a file name

2008-03-26, 09:50(-07), laredotornado:
[...]
> In a given directory, how do I change all file names such that I
> replace the string "show" with the string "event" in the file title?

[...]

If by "file title" you mean file name:

With zsh

autoload -U zmv # usually in ~/.zshrc
zmv '(*)show(*)' '${1}event${2}'

Or:

zmv '*' '$f:s/show/event'

--
Stéphane
  Réponse avec citation
 
Page generated in 0,04198 seconds with 9 queries