Skip to content

Instantly share code, notes, and snippets.

@michabbb
Created May 29, 2015 19:29
Show Gist options
  • Save michabbb/89b242d1895960f7fde7 to your computer and use it in GitHub Desktop.
Save michabbb/89b242d1895960f7fde7 to your computer and use it in GitHub Desktop.
rename files to lower
#!/bin/sh
x=$(find -name '*[A-Z]*');
for i in $x; do
if [ -f "$i" ]
then
LOWER=$(echo "$i"|tr [:upper:] [:lower:]);
echo "move ${i} to ${LOWER}";
mv $i $LOWER
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment