If you don't care if there is more than one file with such a "middle extension" and want to run the risk of losing the others, this simple trick does it:
perl -wle 'for ( <1bn9.*.cnt> ) { qx(mv $_ 1bn9.cnt) }'
On the safe side, run it only once:
perl -wle '$_ = <1bn9.*.cnt>; qx(mv $_ 1bn9.cnt) if $_'
Cheers, Sören
In reply to Re: renaming files question
by Happy-the-monk
in thread renaming files question
by Angharad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |