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..

04:59:08 up 303 days, 9:52, 457 users, load average: 7.92, 5.17, 3.62

Name:

Message:

Do you want to delete this note?



Date: July 23, 2024 - 08:01 AM - 175.139.235.17
xev wrote:

#!/bin/bash

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

# Read the prayer time table file
while read -r line; do
# Split the line into date and time columns
date=$(echo "$line" | cut -d' ' -f1)
times=($(echo "$line" | cut -d' ' -f2-))

# Check if the date matches the current date
if [ "$date" == "$current_date" ]; then
# Loop through the prayer times
for time in "${times[@]}"; do
# Check if the current time matches the prayer time
if [ "$time" == "$current_time" ]; then
# If it's the third column, add 28 minutes
if [ "$((${#times[@]} - 2))" -eq "2" ]; then
echo "It's time for the third prayer ($(date --date="$time + 28 minutes" +%H:%M))!"
else
echo "It's time for prayer!"
fi
fi
done
fi
done < /path/to/prayer/time/table.txt




Password: