Question: HELP NEEDED FOR ALARM CLOCK PROJECT IN BASH ! I'm trying to make a shell script that has multiple alarm clocks, but I am running
HELP NEEDED FOR ALARM CLOCK PROJECT IN BASH !
I'm trying to make a shell script that has multiple alarm clocks, but I am running into a problem.
I try to put the alarm creation in a for loop, but this makes it so that the 2nd alarm will only be created when the 1st alarm has finished. I want it to initialize all alarms in the for loop, and then run them.
COde Below
#!/bin/bash clear
echo "Welcome to your alarm clock. Enter all time stamps as follows: 14:30, 15:20" echo "" read -p "How many alarms do you want to make?: " num
# Decides if previous was a number or not. aa=1 if ((num # For loop with the alarms in them. for ((c=1; c<=num; c++)) do " read -p "What time does your alarm need to go off? (HH:MM) " target echo "" sleep $(( $(date --date="$target" +%s) - $(date +%s) )); echo Wake up! done
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
