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
  • 1
    Creating a subshell reduces the performance. { test … || test …; } && echo OK would do the same thing without creating a subshell. It wouldn't be a definite performance improvement over the original (maybe a slight difference one way or the other depending on the shell0. Commented May 18, 2016 at 21:47
  • Thank you Gilles, how ironic I would actually make it slower! I've updated my answer to reflect your hint. Commented May 19, 2016 at 8:28