-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathe
executable file
·27 lines (23 loc) · 916 Bytes
/
e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
# vim:ft=zsh:
# abstract: grep artist release(s)
# % e mock
# /mnt/music8/+TAGGED/E/Eminem/+other/Eminem │2005│ Mockingbird [MP3]
# - 16M, 3 file(s)
# /mnt/music8/+TAGGED/E/Eminem/+singles/Eminem │2003│ Mockingbird [CD Single] [Single, MP3]
# - 19M, 3 file(s)
# /mnt/music8/+TAGGED/E/Eminem/+singles/Eminem │2004│ Mockingbird [Vinyl, MP3]
# - 23M, 5 file(s)
# /mnt/music8/+TAGGED/E/Eminem/+singles/Eminem │2005│ Mockingbird [Single, CD, MP3]
# - 59M, 6 file(s)
ARTIST=$(ucfirst "$@")
ARTIST_INITIAL=$(initial_letter $ARTIST)
find "/mnt/music8/+TAGGED/${ARTIST_INITIAL}/${ARTIST}" \
-maxdepth 3 \
-type d \
-iname "*${1}*" \
-exec tree -h --du {} \; \
| grep -v ── \
| perl -pe 's/^\n$/\033[38;5;240;1;3m-\033[m/' \
| perl -pe 's/([0-9.]+)(.)\s+used in \d directories, (\d+) files?/\033[1m$1$2\033[m, \033[38;5;214;1;4m$3\033[m file(s)/' \
| ls_color