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*

5
  • Are you sure the set line goes at the end of the script? Commented Aug 12, 2021 at 11:35
  • Also, the -E makes the ERR trap inherited by functions. I don't see any trap defined in your script, though. Commented Aug 12, 2021 at 11:41
  • lost {} now this is right example Commented Aug 12, 2021 at 11:41
  • Possible duplicate of How do I check if a variable exists in an 'if' statement? Commented Aug 12, 2021 at 12:44
  • the script itself works fine for me and in the pointed article How do I check if a variable exists in an 'if' statement? there is nothing about set -Euo pipefail Commented Aug 12, 2021 at 17:41