Results 1 to 1 of 1
Code:
#!/bin/bash
time=$(date +"%H:%M:%S")
while :
do
flag=0
until [ $time = '05:47:00' ]
do
echo "1st loop"
flag=1
done
until [ $time = '05:48:00' ]
do
echo "2nd loop"
...
- 06-20-2010 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 1
Add the conditional check at every step
Code:#!/bin/bash time=$(date +"%H:%M:%S") while : do flag=0 until [ $time = '05:47:00' ] do echo "1st loop" flag=1 done until [ $time = '05:48:00' ] do echo "2nd loop" done done
How to add the conditional check for time at every step and if time is as mentioned and execute the script and move to nect step if the flag is 1.
At the end move to the first step and again wait until time is '05:47:00' and execute for the next day.


Reply With Quote