[Bug 1056205] Re: prename seems to choke on files containing parentheses

vsespb vs at vs-dev.com
Sun Oct 13 21:45:17 UTC 2013


Not a bug, IMHO.

$ rename --verbose s/\.part// *|egrep 'part$'
14-bloodbath-blasting_the_virginborn_(live_at_party_san_2008)-berc.mp3.part renamed as 14-bloodbath-blasting_the_virginborn_(live_aty_san_2008)-berc.mp3.part
15-bloodbath-bathe_in_blood_(live_at_party_san_2008)-berc.mp3.part renamed as 15-bloodbath-bathe_in_blood_(live_aty_san_2008)-berc.mp3.part
16-bloodbath-weak_aside_(live_at_party_san_2008)-berc.mp3.part renamed as 16-bloodbath-weak_aside_(live_aty_san_2008)-berc.mp3.part
17-bloodbath-so_you_die_(live_at_party_san_2008)-berc.mp3.part renamed as 17-bloodbath-so_you_die_(live_aty_san_2008)-berc.mp3.part
18-bloodbath-cry_my_name_(live_at_party_san_2008)-berc.mp3.part renamed as 18-bloodbath-cry_my_name_(live_aty_san_2008)-berc.mp3.part


All affected filenames contain "part" as part of name before ".part". And backslash in expression "s/\.part//" interpreted by shell, not by perl,
so resulting perl regexp is ".part" (which means any character + "part").

Quoting will help

$ rename --verbose 's/\.part//' *
00-bloodbath-bloodbath_over_bloodstock-dvd-2011-berc.jpg.part renamed as 00-bloodbath-bloodbath_over_bloodstock-dvd-2011-berc.jpg
01-bloodbath-ways_to_the_grave-berc.mp3.part renamed as 01-bloodbath-ways_to_the_grave-berc.mp3
02-bloodbath-soul_evisceration-berc.mp3.part renamed as 02-bloodbath-soul_evisceration-berc.mp3
03-bloodbath-process_of_disillumination-berc.mp3.part renamed as 03-bloodbath-process_of_disillumination-berc.mp3
04-bloodbath-iesous-berc.mp3.part renamed as 04-bloodbath-iesous-berc.mp3
05-bloodbath-breeding_death-berc.mp3.part renamed as 05-bloodbath-breeding_death-berc.mp3
06-bloodbath-mouth_of_empty_praise-berc.mp3.part renamed as 06-bloodbath-mouth_of_empty_praise-berc.mp3
07-bloodbath-mass_strangulation-berc.mp3.part renamed as 07-bloodbath-mass_strangulation-berc.mp3
08-bloodbath-cancer_of_the_soul-berc.mp3.part renamed as 08-bloodbath-cancer_of_the_soul-berc.mp3
09-bloodbath-mock_the_cross-berc.mp3.part renamed as 09-bloodbath-mock_the_cross-berc.mp3
10-bloodbath-like_fire-berc.mp3.part renamed as 10-bloodbath-like_fire-berc.mp3
11-bloodbath-outnumbering_the_day-berc.mp3.part renamed as 11-bloodbath-outnumbering_the_day-berc.mp3
12-bloodbath-eaten-berc.mp3.part renamed as 12-bloodbath-eaten-berc.mp3
13-bloodbath-hades_rising_(video)-berc.mp3.part renamed as 13-bloodbath-hades_rising_(video)-berc.mp3
14-bloodbath-blasting_the_virginborn_(live_at_party_san_2008)-berc.mp3.part renamed as 14-bloodbath-blasting_the_virginborn_(live_at_party_san_2008)-berc.mp3
15-bloodbath-bathe_in_blood_(live_at_party_san_2008)-berc.mp3.part renamed as 15-bloodbath-bathe_in_blood_(live_at_party_san_2008)-berc.mp3
16-bloodbath-weak_aside_(live_at_party_san_2008)-berc.mp3.part renamed as 16-bloodbath-weak_aside_(live_at_party_san_2008)-berc.mp3
17-bloodbath-so_you_die_(live_at_party_san_2008)-berc.mp3.part renamed as 17-bloodbath-so_you_die_(live_at_party_san_2008)-berc.mp3
18-bloodbath-cry_my_name_(live_at_party_san_2008)-berc.mp3.part renamed as 18-bloodbath-cry_my_name_(live_at_party_san_2008)-berc.mp3

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to perl in Ubuntu.
https://bugs.launchpad.net/bugs/1056205

Title:
  prename seems to choke on files containing parentheses

Status in “perl” package in Ubuntu:
  New

Bug description:
  This bug is against the "rename" script in the perl package.
  see: man rename

  renaming multiple files containing parentheses.  Using the files attached, you should be able to reproduce.
  extract the archive,
  Do this: (generally the idea here is to remove the extension from the mp3 files)
  rename s/\.part// *

  you will notice that all files are not renamed.
  I expected all files to be renamed.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.10
  Package: perl 5.14.2-13
  ProcVersionSignature: Ubuntu 3.5.0-15.23-generic 3.5.4
  Uname: Linux 3.5.0-15-generic x86_64
  ApportVersion: 2.5.2-0ubuntu4
  Architecture: amd64
  Date: Tue Sep 25 09:36:09 2012
  InstallationMedia: Lubuntu 12.10 "Quantal Quetzal" - Alpha amd64 (20120905.1)
  ProcEnviron:
   LANGUAGE=en_US:en
   TERM=xterm
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: perl
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/perl/+bug/1056205/+subscriptions



More information about the foundations-bugs mailing list