import an old rename script
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
parent
bbe2501cf7
commit
1ea04937d8
1 changed files with 14 additions and 0 deletions
14
old/rename-upper-to-lower-recursively.sh
Executable file
14
old/rename-upper-to-lower-recursively.sh
Executable 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
|
Loading…
Reference in a new issue