mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-27 21:47:46 +01:00
10 lines
335 B
Bash
Executable File
10 lines
335 B
Bash
Executable File
#!/bin/sh
|
|
[ -z "$1" ] && (echo "Error: missing argument (what to remain)" && exit)
|
|
for oldname in "$@"
|
|
do
|
|
newname=`echo "$oldname" | tr '[:upper:]' '[:lower:]' | sed 's/\ /_/g; s/Ö/oe/g; s/Ä/ae/g; s/Ü/ue/g; s/ö/oe/g; s/ä/ae/g; s/ü/ue/g; s/ß/ss/g'`;
|
|
if [[ "$oldname" != "$newname" ]]; then
|
|
mv "$oldname" "$newname";
|
|
fi
|
|
done
|