I made a bash script which is run automatically for every 1 secs using watch command on terminal. Upon waking up the machine from hibernation, the watch command seems to freeze on the last time I close my laptop’s lid, not all the time, but most of the time. Somethings wrong? like for example, some daemon are not running upon waking up or somewhat like that?
I created a bash script called it “time.sh”, inside we have:
#!/bin/bash echo $(date) exit
then execute it using this command:
watch -ctn 1 bash time.sh
it will shows the the date and time, every precisely 1 second, because the script only contain an echo command, so it’s easy to execute. If I put
xidel command for webscrapping that would be depends on the speed of data.
How do I know if it’s not running?
echo $(date) on the last line of my bash code, so it’s clearly show that the script is still stuck at the closing lid time, not changing when waking up. Sometimes it will run after a minutes or so, sometimes it just freeze.
How do I deal with the situation right now?
Manually: CTRL+C, then press UP then ENTER to re-Execute it