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.

5
  • Thank you! That || true option worked. As for the documentation you pasted, can you tell me where/how you found it? I checked man printenv and printenv --help and even looked online and did not find that information. Commented Dec 1, 2016 at 14:01
  • @Watson see the manual or info '(coreutils) printenv invocation' (as documented in the manpage). Commented Dec 1, 2016 at 14:11
  • @dhag Would you mind explaining what a write error is (exit code 2)? What device / file does printenv try to write to where it could go wrong? Does this relate to stdout / stderr, for example when printenv is executed in the background? Commented Jun 22, 2020 at 12:34
  • 1
    @Binarus: Many things could happen that would cause a write error: stdout is closed ((exec 1<&-; printenv) => 2), redirect to a file system where the write fails (printenv >/dev/full => 2), for example. Commented Jun 22, 2020 at 14:50
  • I see. Thank you very much. Commented Jun 22, 2020 at 14:52