file renaming util in perl

reader_at_newsguy.com
Date: 04/29/04


To: beginners@perl.org
Date: Thu, 29 Apr 2004 13:40:33 -0500

Before starting to write my script designed to make filename changing
easier I'd like to ask how to create an editable command line inside a
perl script?

ksh93 and earlier versions does this on user input by default. At
least a primitive amount of editing is possible.

The kind of situation this script is designed for is like this:

We have a number of files already named with names that don't lend
themselves to mass renaming. That is, no recurring stings or the
like. Except maybe the extension and then maybe not all of them.

In this situation its pretty much necessay to process each file
individually by editing parts of its name or replaceing parts etc.

I'd like to have perl generate a globbed list for me, then present
each list memember on an editable command line where I'm allowed
either vi or emacs like line editing to process the given file.

When I hit enter, the current one is renamed seamlessly and the next
one presented.

My skill level isn't very high but I think I can handle the pre
processing and post processing ok. What I need help with is creating
a line editor inside my script.

Can any one offer an outline scheme for something like that?



Relevant Pages

  • [NEWS] IBM Informix Web DataBlade Local Root by Design
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... that ease development of "intelligent", interactive, Web-enabled database ... person who has access to change the Perl script. ...
    (Securiteam)
  • my perl script for ripping mp3s...aka MP3scRIPt
    ... This is a Perl script to convert audio cd tracks to mp3s. ... Possibly root privs to access the cdrom device ... - this is mainly a problem on 'variety cds', mp3 files suffering from this ill ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Perl script to mimic uniq
    ... mdfoster44@netscape.net spits TOFU in my face: ... > # Perl script to find most common CS ... > So I'm back to my original script which looks like this. ... > identify a sequence as unique. ...
    (comp.lang.perl)
  • Re: Slow Performance When Using DBI, otherwise Not
    ... If I run the same perl script on the database server itself it runs ... check versions of DBI and DBD (I greped for version on every module under ...
    (perl.dbi.users)
  • Re: Recovering from compromised system
    ... > perl script I have ever seen, and I would hate even more to learn a new ... > language to understand one script. ... That command is normal for a lot of substring functions. ... Hey, put a few lines in list_2_ck, run the perl script, cat j.ksh. ...
    (comp.os.linux.security)