rename bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux