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*

1
  • I received a suggested edit: "use the exit status that was set in the $(…) ... and in order not to change the function layout to much, just store it in a variable instead of returning it." Thank you, but, I like the idea of returning the exit status of the command substitution so that I can use the function in an if statement, as shown the in example at the bottom. Commented Jan 25, 2022 at 19:27