Prev: Why $NR and $INPUT_LINE_NUMBER are not the same as $.?
Next: FAQ 5.36 Why can't I use "C:\temp\foo" in DOS paths? Why doesn't `C:\temp\foo.exe` work?
From: James Egan on 23 May 2010 11:00 On Sat, 22 May 2010 23:27:27 -0500, Tad McClellan wrote: > James Egan <jegan473(a)comcast.net> wrote: > >> I'm trying to use the perl "rename" script to rename batches of files. > > > What is "the perl rename script"? > > I have never heard of it. It's part of the perl distribution, and is actually a symlink to prename: ls -l /usr/bin/rename lrwxrwxrwx 1 root root 24 Jul 1 2009 /usr/bin/rename -> /etc alternatives/rename ls -l /etc/alternatives/rename lrwxrwxrwx 1 root root 16 Jul 3 2009 /etc/alternatives/rename -> /usr bin/prename dpkg -S /usr/bin/prename perl: /usr/bin/prename
From: James Egan on 23 May 2010 11:10 On Sat, 22 May 2010 15:24:36 -0700, Jürgen Exner wrote: > James Egan <jegan473(a)comcast.net> wrote: >>I'm trying to use the perl "rename" script to rename batches of files. > > What rename script? Did you mean rename command? > >>So if the files are say: >> >>0123.mov >>0124.mov >>0125.mov >> >> >>I want to rename something like: >> >>birthday-01.mov >>birthday-02.mov >>birthday-03.mov > > Is there a relationship between the number 0124 the number 02? If so > which one? > Or do you just want to have consecutive numbers in your new filenames > without any relationship to the numbers in the old files? No, no relationship between the numbers. The numeric portion of the file names are generated by my digital camera, and vary. E.g., the file names could be mvi_0925.mov, mvi_0926.mov, mvi_0927.mov.
From: RedGrittyBrick on 23 May 2010 16:35 On 23/05/2010 16:00, James Egan wrote: > On Sat, 22 May 2010 23:27:27 -0500, Tad McClellan wrote: > >> James Egan<jegan473(a)comcast.net> wrote: >> >>> I'm trying to use the perl "rename" script to rename batches of files. >> >> >> What is "the perl rename script"? >> >> I have never heard of it. > > > It's part of the perl distribution, and is actually a symlink to prename: So far as I can see: Part of "the perl distribution" - No. Part of Debian's "perl" package - Yes. The rename/prename script is not listed at http://perldoc.perl.org/index-utilities.html which is part of "the official documentation from the Perl distribution(s)". -- RGB
From: Ilya Zakharevich on 23 May 2010 19:04 On 2010-05-23, RedGrittyBrick <RedGrittyBrick(a)SpamWeary.invalid> wrote: >>> What is "the perl rename script"? >>> I have never heard of it. >> It's part of the perl distribution, and is actually a symlink to prename: > So far as I can see: > > Part of "the perl distribution" - No. > > Part of Debian's "perl" package - Yes. > > The rename/prename script is not listed at > http://perldoc.perl.org/index-utilities.html which is part of "the > official documentation from the Perl distribution(s)". Some people know how to look, some do not: K:\get-perl\perl>ls perl5.005_03/eg ADB client findtar myrup rmfrom sysvipc van README down g nih scan travesty who cgi dus muck relink server unuc wrapsuid changes findcp muck.man rename shmkill uudecode Hope this helps, Ilya
From: Xho Jingleheimerschmidt on 23 May 2010 21:39
Tad McClellan wrote: > James Egan <jegan473(a)comcast.net> wrote: > >> I'm trying to use the perl "rename" script to rename batches of files. > > > What is "the perl rename script"? > > I have never heard of it. I was quite surprised to find it on my Asus Linux machine, as I am used to 'rename' being a binary which does fixed string substitutions. /home/user> head /usr/bin/rename #!/usr/bin/perl -w # # This script was developed by Robin Barker (Robin.Barker(a)npl.co.uk), # from Larry Wall's original script eg/rename from the perl source. # # This script is free software; you can redistribute it and/or modify it # under the same terms as Perl itself. Xho |