#!/bin/sh

for file in `ls ./`
do
md5=`md5sum ${file}`
echo ${file}
name=${md5:0:32}
if [[ "${file}" != "rename.sh" ]] && [[ ! -f "${name}.txt" ]]; then
  echo "${name}"
  mv "${file}" "${name}.txt"
fi
done