Showing posts with label change extension of file. Show all posts
Showing posts with label change extension of file. Show all posts

add or change extension of files

add .udf to all files in working directory

for i in `ls`; do mv $i $i".udf"; done

change extensions of files to "zip".
#new extension: zip
yeniUzanti="zip"; for i in `ls`; do noktalar=`echo $i|awk -F. '{ print NF - 1 }'`; dosyaAdi=`echo $i|cut -d'.' -f1-$noktalar`; mv $i $dosyaAdi"."$yeniUzanti; done