Here the shell passes all (nonon-hidden) files to rename
and rename
will ignore the files whose name the perl
code doesn't change. You could also tell the shell to only pass the file names that contain pre_
case-insensitively with ./~(i)*pre_*
in ksh93
, ./(#i)*pre_*
in zsh -o extendedglob
, setting the nocaseglob
option globally in bash
, zsh
or yash
or use ./*[pP][rR][eE]_*
.
Stéphane Chazelas
- 565.2k
- 96
- 1.1k
- 1.6k
Address some security concerns and align the behavious of the `rename` based approach.
Stéphane Chazelas
- 565.2k
- 96
- 1.1k
- 1.6k