Posts Tagged ‘bash’
Rename Multiple Files in Bash
08Nov09
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
Filed under: primer, programming | Leave a Comment
Tags: bash, primer, programming