Im Grunde genommen versuche ich, die Bewertung von einem MP3-Programm zu erhalten. Mit dem Befehlszeilentool id3v2 kann ich die Bewertung erhalten, in die mein Programm sie schreibt:
$ id3v2 -R Drake\ -\ Over3.mp3
id3v1 tag info for Drake - Over3.mp3:
Title : Over Artist: Drake
Album : Thank Me Later Year: 2010, Genre: Unknown (255)
Comment: The highly anticipated debut Track: 0
id3v2 tag info for Drake - Over3.mp3:
TPE2 (Band/orchestra/accompaniment): Drake
TIT2 (Title/songname/content description): Over
TPE1 (Lead performer(s)/Soloist(s)): Drake
TALB (Album/Movie/Show title): Thank Me Later
TYER (Year): 2010
TCON (Content type): Rap - Hip-Hop (255)
TPUB (Publisher): Cash money/Universal Motown
POPM (Popularimeter): Windows Media Player 9 Series, counter=0 rating=196COMM (Comments): (MusicMatch_Preference)[eng]: Very Good
COMM (Comments): ()[eng]: The highly anticipated debut from Drake is here! "Thank Me Later" is hotest album in the game.
APIC (Attached picture): ()[, 3]: image/jpg, 38227 bytes
COMM (Comments): (ID3v1 Comment)[XXX]: The highly anticipated debut
TRCK (Track number/Position in set): PUB
Worauf ich eingrenzen kann
$ id3v2 -R Drake\ -\ Over3.mp3 | grep POPM
POPM (Popularimeter): Windows Media Player 9 Series, counter=0 rating=196COMM (Comments): (MusicMatch_Preference)[eng]: Very Good
Problem:
Ich bin mir nicht sicher, wie ich aus dieser Zeichenfolge 'rating = ###' erhalten kann. Mein awk / sed-fu ist schwach :(
command-line
awk
Roy Rico
quelle
quelle
grep POPM
plus deingrep -o ...
.