Angharad has asked for the wisdom of the Perl Monks concerning the following question:
Hi there
I have a perl script that creates a particular file. However, depending on the eventual users of the script, sometimes the filename might look like this
I've tried a simple mv command
Can anyone suggest a solution ... be it Perl or a Unix command? It would be much appreciated.
I have a perl script that creates a particular file. However, depending on the eventual users of the script, sometimes the filename might look like this
And other times like this1bn9.en.cnt
I want to circum-navigate this problem by renaming the file as follows1bn9.pd.cnt
before processing it further1bn9.cnt
I've tried a simple mv command
But that complains about their being multiple files and therefore the destination having to be a directory, which is not what I want at all.mv 1bn9.*.cnt 1bn9.cnt
Can anyone suggest a solution ... be it Perl or a Unix command? It would be much appreciated.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: renaming files question
by Happy-the-monk (Canon) on Jan 06, 2006 at 13:25 UTC | |
Re: renaming files question
by tirwhan (Abbot) on Jan 06, 2006 at 13:19 UTC | |
Re: renaming files question
by DungeonKeeper (Novice) on Jan 06, 2006 at 13:56 UTC | |
Re: renaming files question
by sh1tn (Priest) on Jan 06, 2006 at 13:46 UTC | |
Re: renaming files question
by kulls (Hermit) on Jan 06, 2006 at 14:37 UTC | |
by Tanktalus (Canon) on Jan 06, 2006 at 16:44 UTC | |
Re: renaming files question
by vek (Prior) on Jan 06, 2006 at 19:13 UTC |
Back to
Seekers of Perl Wisdom