|We don't bite newbies here... much|
Watching LXTerminal for outputsby simonshout (Initiate)
|on Feb 03, 2013 at 22:00 UTC||Need Help??|
simonshout has asked for the
wisdom of the Perl Monks concerning the following question:
I have just started teaching myself Perl a few weeks ago for a school project so please excuse me if I do not know the technical terms for some things.
My script uses mpg321 to play an mp3 file and I want to wrap some logic in an if statement that checks to see if the song is done playing.
I am trying to "watch" the LXTerminal because when mpg321 is done playing a song it will output to the terminal:
0:00 Decoding of song.mp3 finished.
So I was wondering if there was any way for me to have my script somehow watch the terminal and wait for the line above to be output.
Even if there is any way for me to know if a song has been done playing, any help is greatly appreciated. I just need a push in the right direction
Thank you all for your wisdom!