Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • When you invoke notify-send "Battery below 5%" && echo Success does the output include the word "Success"? Commented Jul 13, 2022 at 18:30
  • sleep 60 is never triggering in the false case, as you combine all actions with && so it runs in an endless loop. Commented Jul 13, 2022 at 18:31
  • At some point, you will have this script running in the background, and you will want to terminate it. That will be much easier if you write your script as while sleep 60; do ... done. That way, to terminate the loop all you have to do is wait for the sleep 60 process to show up, and send a SIGTERM to its PID. while true loops are often notoriously hard to kill. Commented Jul 13, 2022 at 19:23