11 lines
272 B
Bash
Executable File
11 lines
272 B
Bash
Executable File
#!/bin/bash
|
|
|
|
dir="$(pwd)"
|
|
readarray -t album_paths < <(find "$dir" -mindepth 1 -type d)
|
|
for path in "${album_paths[@]}"; do
|
|
year_album="$(sed 's#.*/##' <<< "$path")"
|
|
year="${year_album%% *}"
|
|
album="${year_album#* }"
|
|
printf 'Year: %s Album: %s\n' "$year" "$album"
|
|
done
|