Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help writing this in BASH/SHELL PROGRAMMING LANGUAGE: THE PICTURE IS AS SHOWN! The first task is already done! I need help with the
I need help writing this in BASH/SHELL PROGRAMMING LANGUAGE: THE PICTURE IS AS SHOWN! The first task is already done! I need help with the remaining ones!!
The tasks are: 1. Put 100 audio files (mp3 format) in a directory called "songs" 2. Write a program that randomly selects one of these songs and plays it. 3. You must guarantee that all 100 songs will be played once before you start playing a song a second time. Similarly, all songs must be played twice before you continue to the third pass. 4. Your program automatically progresses from one song to the next (use a loop). It must play forever. It must keep track of its status so that you can restart the program. If I kill it, it should resume from where it left off. You don't have to start the song that was currently playing, but you must randomly select the next most available song. 5. When all songs have been played once and you start the next pass, the order must be randomized (you can't use the same order for every pass). 6. 7. It must be coded in shell (Bourne shell, not bash). 8. It must run from a terminal window as a Linux command (e.g., my_player.sh). A GUI is not required. 9. You must demonstrate you can launch the command in the background and then kill the job with a kill command (as demonstrated in class). Describe what happens when you kill the shellscript - be very specific in how you explain what is happening. The tasks are: 1. Put 100 audio files (mp3 format) in a directory called "songs" 2. Write a program that randomly selects one of these songs and plays it. 3. You must guarantee that all 100 songs will be played once before you start playing a song a second time. Similarly, all songs must be played twice before you continue to the third pass. 4. Your program automatically progresses from one song to the next (use a loop). It must play forever. It must keep track of its status so that you can restart the program. If I kill it, it should resume from where it left off. You don't have to start the song that was currently playing, but you must randomly select the next most available song. 5. When all songs have been played once and you start the next pass, the order must be randomized (you can't use the same order for every pass). 6. 7. It must be coded in shell (Bourne shell, not bash). 8. It must run from a terminal window as a Linux command (e.g., my_player.sh). A GUI is not required. 9. You must demonstrate you can launch the command in the background and then kill the job with a kill command (as demonstrated in class). Describe what happens when you kill the shellscript - be very specific in how you explain what is happening
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started