任何人都可以解释为什么对“艺术家”的重击会返回结果,但是对“艺术家:”的追问会什么都不返回?
第一个结果:
MacBook-Pro:~ kjesso$ eyed3 ./Music/Deftones/2006\ -\ Saturday\ Night\ Wrist/Deftones\ -\ 02\ -\ Rapture.mp3
Deftones - 02 - Rapture.mp3 [ 5.26 MB ]
-------------------------------------------------------------------------------
Time: 03:25 MPEG1, Layer III [ ~213 kb/s @ 44100 Hz - Joint stereo ]
-------------------------------------------------------------------------------
ID3 v2.3:
title: Rapture
artist: Deftones
album: Saturday Night Wrist
album artist: None
recording date: 2006
track: 2 genre: Rock (id 17)
Publisher/label: Maverick
第二个结果:
MacBook-Pro:~ kjesso$ eyed3 ./Music/Deftones/2006\ -\ Saturday\ Night\ Wrist/Deftones\ -\ 02\ -\ Rapture.mp3 | grep "artist"
artist: Deftones
album artist: None
第三个结果:
MacBook-Pro:~ kjesso$ eyed3 ./Music/Deftones/2006\ -\ Saturday\ Night\ Wrist/Deftones\ -\ 02\ -\ Rapture.mp3 | grep "artist:"
答案 0 :(得分:2)
添加--no-color
选项可以完美运行:
$ eyed3 --no-color ./Music/Deftones/2006\ -\ Saturday\ Night\ Wrist/Deftones\ -\ 02\ -\ Rapture.mp3 | grep "artist:"
答案 1 :(得分:0)
您确定正确键入了第三个实例吗?它对我很有用:
$ cat foo.txt
Deftones - 02 - Rapture.mp3 [ 5.26 MB ]
-------------------------------------------------------------------------------
Time: 03:25 MPEG1, Layer III [ ~213 kb/s @ 44100 Hz - Joint stereo ]
-------------------------------------------------------------------------------
ID3 v2.3:
title: Rapture
artist: Deftones
album: Saturday Night Wrist
album artist: None
recording date: 2006
track: 2 genre: Rock (id 17)
Publisher/label: Maverick
$ cat foo.txt | grep "artist"
artist: Deftones
album artist: None
$ cat foo.txt | grep "artist:"
artist: Deftones
album artist: None
也许您错误地键入了分号而不是冒号?
$ cat foo.txt | grep "artist;"
$