Ich möchte ein Shell skript schreiben test.sh <old-prefix> <new-prefix> welches bei allen Dateinamen im aktuellen Verzeichnis die mit Präfix <old-prefix>beginnen durch den Präfix <new-prefix> ersetzt.
Irgendwie so?
$ ls
foo.dat foobar premv.sh test.txt
$ ./premv.sh foo zzz
$ ls
premv.sh test.txt zzz.dat zzzbar
Irgendwie so?
$ ls
foo.dat foobar premv.sh test.txt
$ ./premv.sh foo zzz
$ ls
premv.sh test.txt zzz.dat zzzbar