I recently reformatted my Raspberry Pi 4b microSD card to use Ubuntu since I like it better than Raspbian. Usually I can resolve something like this, but the problem has taken a good chunk of time from my day. Does anyone have any possible solutions to resolve this glitchy output from XRDP? I am using the Windows 10 Remote Desktop Connection software to connect to it.
Home
/
user-1103618
CJ--'s questions
I am trying to create a countdown - most likely the hard way. I have it setup like this:
#! /bin/bash
#When to execute command
execute=$(date +"%T" -d "22:30:00")
#Current time
time=$(date +"%T")
#Subtract one from the other.... the below is line 11
math=$(("$execute"-"$time"))
#Repeat until time is 22:30:00
until [ "$math" == "00:00:00" ]; do
echo "Countdown is stopping in $math"
sleep 1
clear
done
The problem is.... It isn’t working. Here’s the output in the terminal:
/path/to/file/test.sh: line 11: 22:30:00-16:39:22: syntax error in expression (error token is “:30:00-16:39:22”)
Countdown is stopping in
Firstly, the error message, what’s wrong?
Secondly, the “Countdown is stopping in” message should have the hours, minutes, and seconds that the countdown will stop in. Why doesn’t it? Keep in mind I am not a professional.