UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
On my box rename is an elf 32-bit executable (file `which rename` to find out), the error you show looks like a 'script' error, not an executable binary error.
thanks for you suggestion, no alias set however. I traced the rename executable and found that it is in fact a perl script called prename. The first line in this script reads
use strict;
I uncommented this line but to no effect. Now I get
Unquoted string "abc" may clash with future reserved word at (eval 1) line 2.
Unquoted string "abc" may clash with future reserved word at (eval 2) line 2.
Unquoted string "abc" may clash with future reserved word at (eval 3) line 2.
Unquoted string "abc" may clash with future reserved word at (eval 4) line 2.
Unquoted string "abc" may clash with future reserved word at (eval 5) line 2.
Any ideas? If not, I may just copy over the rename executable from a different distro.
I don't have prename on my box, only the binary version I mentioned earlier. But if a perl script only works if you don not use 'use strict' (and/or 'use warnings') it cannot be, and probably isn't, a good perl script (my 2c). Both should be used. Always.
Only thing I can come up with: Is the usage the same as the 'real' rename (man prename)?
Thanks again. Indeed, the usage seems to differ -- I should have thought of that before. prename is expecting a perl expression. While that may be a useful in some situations it isn't for me, because I need my scripts to run on more than one box and distro. So I'll get rid of the ubuntu prename in favour of the real thing.
Do you happen to know what package rename comes with? Is it in coreutils?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.