cyclist
1
Could someone help me. I need a bash script to play a short sound file, wait for 30 seconds, play another sound file, wait for another 30 seconds.
(I will use it as a reminder to spend 30 seconds on each quadrant of my teeth when using a electric toothbrush.)
This is what I have so far.
Thanks.
mpg123 /usr/share/sounds/My_Sounds/Alarm_Clock_Sound.mp3
mpg123 /usr/share/sounds/My_Sounds/Alarm-sound-buzzer.mp3
@cyclist ,
something along
#!/bin/bash
for mp3 in file-list
do
mpg123 "$mp3"
sleep 30
done
if passing on the command line ....
#!/bin/bash
for mp3 in "$@"
do
mpg123 "$mp3"
sleep 30
done
cyclist
3
Is file-list a text file with the names of the .mp3 I need to play?
I am rusty.
@cyclist , you should do a simple online search for this, rusty or otherwise, it'll help remove some of the rust.
#!/bin/bash
while IFS= read -r mp3
do
mpg123 "$mp3"
done < inputFile
cyclist
5
Thanks.
I do searches and consult a text file that I made that contains Tips and Tricks for Ubuntu Mate.
I am not perfect.
I have memory problems. Old age does have some negatives.
I will try out your answer.
You'll obviously need to add the sleep to that !