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.

1
  • if you're happy with using word splitting on the string (i.e. that for REGION in ${DISCOVERED}), then a leading or trailing space doesn't matter, it'll disappear during word splitting. So in that case, you might as well use DISCOVERED+=" us-east-1" etc. to append to it. But, seriously, it'd be much cleaner if you just used an array all the way, and would actually work even in the future if/when you need values that themselves contain whitespace or glob characters. Commented Jul 10, 2023 at 19:55