17 Jun
2003
17 Jun
'03
16:59
* James Ogley (james@usr-local-bin.org) [030617 14:48]:
filename.SNG.txt
(don't ask - long story...)
Now, filename is a random sequence of between 5 and eight numeric characters.
My question is this:
Does anyone know of a way in bash script to rename all the files of the above format to filename.txt?
Something like ls *SNG* | while read name; do new=${name/.SNG.txt/.txt} mv $name $new done -- -ckm