#!/bin/bash #echo $1 OLD="$1" NEW=`echo $1|sed -e 's/ - /-/g' -e 's/ & / and /g' -e 's/&/and/g' -e 's/ /_/g' -e 's/ä/ae/g' -e 's/ü/ue/g' -e 's/ö/oe/g' -e 's/Ä/Ae/g' -e 's/Ü/Ue/g' -e 's/Ö/Oe/g' -e 's/ß/ss/g' -e 's/\[//g' -e 's/\]//g' -e 's/(//g' -e 's/)//g' -e 's/#//g' -e 's/\!//g' ` NEW=`echo $NEW|tr '\326' '\173'|sed -e 's/{/Oe/g'` NEW=`echo $NEW|tr '\344' '\173'|sed -e 's/{/ae/g'` NEW=`echo $NEW|tr '\047' '\173'|sed -e 's/{/-/g'` NEW=`echo $NEW|tr '\304' '\173'|sed -e 's/{/Ae/g'` NEW=`echo $NEW|tr '\366' '\173'|sed -e 's/{/oe/g'` NEW=`echo $NEW|tr '\374' '\173'|sed -e 's/{/ue/g'` #NEW=`echo $NEW|tr '\326' '\173'|sed -e 's/{/ae/g'` if [ "$OLD" != "$NEW" ] then if [ -f "$NEW" ] || [ -d "$NEW" ] then echo "$NEW existiert bereits" >&2 else echo "Datei $OLD wird zu $NEW umbenannt" mv "${OLD}" "${NEW}" fi fi