So Leute, ich muss mich mal als total Unfähiger outen:
bisher habe ich das Skript (habe ich ja oben gepostet nachdem ich es übernommen habe) in das Foto-Verzeichnis gepackt (während in den Unterverzeichnissen ABCD, EFGH, ...usw. bis UVXYZ die Unterunterverzeichnisse im bekannten Format "Petra (3421) 1282 67830123SHH" usw. liegen). Das Skript habe ich in Zeile 10 mit "Fotos/" angepasst, also:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #!/bin/bash while read; do name="${REPLY##*/}" z="${name#*) }" z=${z:0:4} echo $z >> tmp.txt echo "$z $name" num[1$z]=$name done < <( find [mark]Fotos/[/mark] -type d -regextype posix-extended -regex '.+ \([0-9]{4}\) [0-9]{4}[^/]*' ) for i in {0001..0004} {0789..0793} {1279..1283} {2220..2224}; do if [ "${num[1$i]}" = "" ]; then echo "$i fehlt." fi done echo $(sort tmp.txt | uniq -d) " mehrfach!" rm tmp.txt |
Die Ausgabe von "tree" ist hier (stark gekürzt):
1 2 3 4 5 6 7 8 9 10 11 12 13 | Fotos ├── ABCD ├── EFGH ├── IJKL ├── MNOP ├── QRST │ ├── Roger (1432) 1243 43276670Epp │ │ │ └── Sabine (7602) 0009 ├── UVWXYZ ├── zZz.neu ├── zZz.logs └── zZz.database |
Ich hoffe, dass ich mich nun nicht schon wieder total doof anstelle...
Achja: aufgerufen habe ich immer mittels
1 | ./test |
Soweit aber erstmal herzlichen Dank - tolle Community!