Thanks for the clarification!
Type: Posts; User: sisco311; Keyword(s):
Thanks for the clarification!
or:
mplayer file.mp3 | while read line; do echo $line | grep Title >> out.txt; done
yep, you are right.
grep is writing to stdout (standard output),
stdout is redirected to the file when grep exits.
The output of mplayer is piped to grep when mplayer exits.
I would use mp3info
mp3info -p "Title: %t\nArtist: %a\n" /path/to/file > file