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*

3
  • 1
    Sorry, but it's unclear to me what you find strange. Commented Jan 29, 2017 at 17:08
  • 1
    @Kusalananda Maybe it helps to tell you that it started with me asking myself: "Why does false;foo="bar";echo $? always return 0 when the last real command that ran was false?" It's basically that assignments behave special when it comes to exit codes. Their exit code is always 0, except when it isn't because of something which ran as part of the right-hand side of the assignment. Commented Jan 29, 2017 at 17:12
  • 1
    Related: stackoverflow.com/questions/20157938/… Commented Jan 29, 2017 at 17:37