Basically, I've been working on a scheduling program for a while now, and it suddenly stopped working, and I don't know why. Here's what it does:
It stores the schedule items with their date and time in a file stored in /home/USER/.schedule/schedule.txt, as well as items that happen once a week in /home/USER/.schedule/recurring.txt. Here's the script that seems to be the problem:
for HOUR in {00..23..-1}
do
for MINUTE in {00..59..-1}
do
cat /home/"$USER"/.schedule/schedule.txt | grep -i "`date +%m/%d/%Y` $HOUR:$MINUTE" | cat /home/"$USER"/.schedule/recurring.txt | grep -i "`date +%A` $HOUR:$MINUTE"
done
done
I have no idea what's going wrong, or what I changed that broke it. Please help.
Edit 1: The problems seemed to start when I added a second and third user to the computer, though I have no idea why that would change anything.
Piping
cat
tocat
is ineffective. Parenthesize, and separate thecat
s with a;
.