util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rename bug
@ 2020-05-11 23:13 ml
  2020-05-12  6:30 ` Sami Kerola
  0 siblings, 1 reply; 2+ messages in thread
From: ml @ 2020-05-11 23:13 UTC (permalink / raw)
  To: util-linux

Hallo

here is a bug in the rename command.
Pleae test it:

The rename command doesn't work from another directory, when there is a 
"^" (beginn-line) in the regular-expression.

# script beginn ----- ----- ----- ----- -----
$ uname -a
Linux ftd2 4.15.0-3-amd64 #1 SMP Debian 4.15.17-1 (2018-04-19) x86_64 
GNU/Linux
$ rename -V
/usr/bin/rename using File::Rename version 1.10


$ mkdir test
$ cd test/
/test$ touch Film-filmtitle1.txt
/test$ cd ..
$ mkdir test2
$ cd test2

/test2$ rename -v -e 's/^Film-//eg' ~/skripte/test/*

/test2$ ls -l  ~/skripte/test/*
-rw-r--r-- 1 ft ft 0 Mai 12 00:48 /...../test/Film-filmtitle1.txt

/test2$ cd ../test

/test$ rename -v -e 's/^Film-//eg' *
Use of uninitialized value in substitution iterator at (eval 8) line 1.
Film-filmtitle1.txt renamed as filmtitle1.txt

/test$ ls -l  *
-rw-r--r-- 1 ft ft 0 Mai 12 00:48 filmtitle1.txt

# script end ----- ----- ----- ----- -----

In the script, the first rename command have no result/output,
the second rename command there is a result.


 From Germany
Franz

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: rename bug
  2020-05-11 23:13 rename bug ml
@ 2020-05-12  6:30 ` Sami Kerola
  0 siblings, 0 replies; 2+ messages in thread
From: Sami Kerola @ 2020-05-12  6:30 UTC (permalink / raw)
  To: ml; +Cc: util-linux

On Tue, 12 May 2020 at 00:30, <ml@ft-c.de> wrote:
> here is a bug in the rename command.
> Pleae test it:
>
> The rename command doesn't work from another directory, when there is a
> "^" (beginn-line) in the regular-expression.

[snip]

> $ rename -V
> /usr/bin/rename using File::Rename version 1.10

Hi Franz

The email list you sent the bug report is maintaining different
rename(1) implementation.

$ rename -V
rename from util-linux 2.35.1

I think good place to report the issue is Debian distribution bug
tracker or straight to Perl cpan upstream.

https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=rename;dist=unstable
https://rt.cpan.org/Public/Dist/Display.html?Name=File-Rename

-- 
Sami Kerola
http://www.iki.fi/kerolasa/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-12  6:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 23:13 rename bug ml
2020-05-12  6:30 ` Sami Kerola

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).