Just log in with your secure internet shell to change this file!

me: yea.. added a few words already..
me update: actually..its quite a lot now..do you like it?

You may want to read: How to ~tilde: Getting Started for help.

me: ok..sure

Check out your new blog!

me: nice.. thank you..

05:00:20 up 303 days, 9:53, 457 users, load average: 6.85, 5.39, 3.81

Name:

Message:

Do you want to delete this note?



Date: July 23, 2024 - 07:58 AM - 175.139.235.17
xev wrote:

#!/bin/bash

# Path to the file containing prayer time table
time_table_file="prayer_times.txt"

# Get current date and time
current_date=$(date +%Y%m%d)
current_time=$(date +%H:%M)

# Adjusted time for the third column
adjusted_time=$(date -d "$current_time + 28 minutes" +%H:%M)

# Find matching time in the table and alert if found
while read -r line; do
# Extract date and times from the line
table_date=$(echo "$line" | awk '{print $1}')
time1=$(echo "$line" | awk '{print $2}')
time2=$(echo "$line" | awk '{print $3}')
time3=$(echo "$line" | awk '{print $4}')
time4=$(echo "$line" | awk '{print $5}')
time5=$(echo "$line" | awk '{print $6}')
time6=$(echo "$line" | awk '{print $7}')

# Check if the line's date matches today's date
if [[ "$table_date" == "$current_date" ]]; then
# Compare current time with each time in the table
if [[ "$time1" == "$current_time" ]]; then
echo "It's time!"
fi
if [[ "$time2" == "$current_time" ]]; then
echo "It's time!"
fi
# Adjusted time for the third column
if [[ "$time3" == "$adjusted_time" ]]; then
echo "It's time!"
fi
if [[ "$time4" == "$current_time" ]]; then
echo "It's time!"
fi
if [[ "$time5" == "$current_time" ]]; then
echo "It's time!"
fi
if [[ "$time6" == "$current_time" ]]; then
echo "It's time!"
fi
fi
done < "$time_table_file"




Password: