rename-script
This commit is contained in:
parent
66539f9983
commit
50638cc187
1 changed files with 19 additions and 0 deletions
19
mv_dir.sh
Executable file
19
mv_dir.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
stichwort="$1"
|
||||
|
||||
while (( "$#" ))
|
||||
do
|
||||
|
||||
cd "${1%/*}" # gehe ins Verzeichnis
|
||||
|
||||
FILENAME=${1##*/} # Dateiname ist alles ab dem letzten '/'
|
||||
echo "$FILENAME"
|
||||
# guck dir die Ausgabe erstmal an - wenn alles passt kannst Du das "echo" weglassen
|
||||
mv "$FILENAME" "${FILENAME%-*}"
|
||||
|
||||
shift
|
||||
cd -
|
||||
done
|
||||
|
||||
#mv_dir.sh <Ordner>/*master
|
Loading…
Reference in a new issue