Public bug reported:
Binary package hint: perl
Hi,
I like to use find and perl's rename utility to massively rename files.
However prename also applies the supplied regular expression to the
whole path not just the filename part, although it obviously cannot
rename the directory part. Here's an example:
% /usr/bin/rename -n 's/A/a/' dirA/fileA
dirA/fileA renamed as dira/fileA
% /usr/bin/rename -n 's/A/a/g' dirA/fileA
dirA/fileA renamed as dira/filea
Both examples would fail without -n. Instead, it should better work like
this, only applying the regex to the filename part:
% local/scripts/rename -n 's/A/a/' dirA/fileA
dirA/fileA renamed as dirA/filea
% local/scripts/rename -n 's/A/a/g' dirA/fileA
dirA/fileA renamed as dirA/filea
Although, I know it is possible to write regular expressions that work
this way, it is difficult to get it right and more difficult to use this
tool. A patch has been attached.
for reference:
# lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04
# apt-cache policy perl
perl:
Installed: 5.10.0-19ubuntu1.1
Candidate: 5.10.0-19ubuntu1.1
Version table:
5.10.0-24ubuntu2 0
1 http://de.archive.ubuntu.com karmic/main Packages
*** 5.10.0-19ubuntu1.1 0
500 http://security.ubuntu.com jaunty-security/main Packages
500 http://de.archive.ubuntu.com jaunty-updates/main Packages
100 /var/lib/dpkg/status
5.10.0-19ubuntu1 0
500 http://de.archive.ubuntu.com jaunty/main Packages
** Affects: perl (Ubuntu)
Importance: Undecided
Status: New
--
prename directoy fix
https://bugs.launchpad.net/bugs/408392
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs