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 this
I want to circum-navigate this problem by renaming the file as follows
before processing it further
I've tried a simple mv command
mv 1bn9.*.cnt 1bn9.cnt
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.
Can anyone suggest a solution ... be it Perl or a Unix command? It would be much appreciated.