bash script to accept input ONLY until background process completes
I am setting up a bash script to act as a jukebox music player of sorts. The audio files are being played by mpg123. I want to allow the user various options while mpg123 is playing the music file. The options could be "quit" or "next song" for example.
I know how to use the "read" command to get user input but I don't know how to cancel the read command upon the completion of the sound file. Any ideas? |
Re: bash script to accept input ONLY until background process completes
Quote:
|
maillion,
thanks for the tip! From reading info on the select command, it appears to be perfect for my application. Any ideas on the second part of my question? How can I kill the select menu if no option is selected by the time mpg123 is finished playing a song? |
All times are GMT -5. The time now is 12:19 PM. |