批量修改后缀名的bash 脚本

# ! / bin / sh
# filename:rename_suffix . sh
# author:zhouhh
# blog:http: // blog . csdn . net / ablo_zhou
# Email:ablozhou@gmail . com
# Date : 2008.4 . 1

echo " inputwhatsuffixwillbereplaced: "
readSUFFIX_SRC
echo " inputwhatsuffixoffiletorenameto: "
readSUFFIX_DST


for iin* .$ SUFFIX_SRC
do
if [-e $ i] ; then
echo " mv$ito`basename$i.$SUFFIX_SRC`.$SUFFIX_DST "
mv
$ i`basename $ i .$ SUFFIX_SRC` .$ SUFFIX_DST
else
echo " filedoesnotexist. "
exit - 1
fi

done

你可能感兴趣的:(.net,脚本,Blog,bash,Gmail)