Posts Tagged ‘bash’

Here’s a quick tip for renaming multiple files with the same name <name> but different extensions <ext>. You want to retain the extensions and only change <name> to <new-name>.

for i in `ls`; do
mv -fv “$i” `ls “$i” | sed ’s/././’`
done