Renaming files to put a leading zero in them (Linux)

A cheap MP3 player had some issues with an audio book with more than 100 files. The files had a single leading zero prefix as until recently there were no books on it with more than 100 files. The below code block renames the files.

OIFS="$IFS"
IFS=$'\n'
for file in `find . -type f -name "*.m4a"`  
do
echo "file: = $file" ;
mv "$file" "$(echo ${file} | sed -r 's/\b([0-9]{2}[\.])/0\1/')";
done
IFS="$OIFS"

Leave a Reply

You must be logged in to post a comment.


thamil rockers.in rajwap.tv fuckindia deshi xxx pornfactory.info sex film kannada nest matrimony sobazo.com golaghat fake public agent popsexy.net sexyvideofilm df xxx video freeindianporn3.com sixxxx brizzers.com bananocams.com nude desi bhabhi chat indian nude modelling apacams.com sex vdeio com nepali video x hindiporn2.com west indies sex naked sex videos doodhwali.net temil sex com gujarat nude xxxdesitube2.com odia sxe com preetha vijayakumar anybunny.mobi live tamil sex how to do sex xnxx bukaporn.net janwar ki bf office sex redtube tubetria.mobi sxs video sxs iwank tube indian onlyindianporn2.com sexy padam video www.drtuber mobiporno.info spank bamg