Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save leonaugusto16/460aa05f711c5a9b2b6430848db7d767 to your computer and use it in GitHub Desktop.

Select an option

Save leonaugusto16/460aa05f711c5a9b2b6430848db7d767 to your computer and use it in GitHub Desktop.
for SRC in `find . -maxdepth 1`
do
DST=`dirname "${SRC}"`/`basename "${SRC}" | tr '[A-Z]' '[a-z]'`
if [ "${SRC}" != "${DST}" ]
then
[ ! -e "${DST}" ] && mv -T "${SRC}" "${DST}" || echo "${SRC} was not renamed"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment