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.

Required fields*

2
  • 4
    How is that better than simply if systemctl is-active --quiet tomcat.service? Also, [[ isn't standard shell. Commented Jun 13, 2019 at 17:55
  • @TobySpeight You need to read my post a bit more as I mentioned in my post "This is how I made use of.... Just sharing mine." I never said, its a standard shell usage, if u make it single bracket, it will become then but thats out of scope here. Moreover I below mention easy single line usage to do it using && and ||. Commented Jun 19, 2019 at 9:34