import an old rename script

Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
Nico Schottelius 2010-01-02 13:27:35 +01:00
parent bbe2501cf7
commit 1ea04937d8

View file

@ -0,0 +1,14 @@
#!/bin/sh
# Usage:
# cd /home/user/nico/Maildir/ethz/INBOX && find . -type d -exec ~/rename.sh {} \;
old="$1"
new="$(echo $old | tr '[A-Z]' '[a-z]')"
if [ "$new" != "$old" ]; then
if [ ! -e "$old" ]; then
echo "Skipping already renamed $old"
else
mv -v "$old" "$new"
fi
fi