Skip to main content
added 144 characters in body
Source Link
l0b0
  • 53.6k
  • 48
  • 225
  • 398

Whenever you have a string which represents a string variable assignment, the Right Way™a safe and simple way to perform that assignment is declare (and Using More Quotes™Using More Quotes™):

$ xxx='website_endpoint="my-site.s3-website-us-east-1.amazonaws.com"'
$ declare "$xxx"
$ echo "$website_endpoint"
"my-site.s3-website-us-east-1.amazonaws.com"

Whenever you have a string which represents a variable assignment, the Right Way™ to perform that assignment is declare (and Using More Quotes™):

$ xxx='website_endpoint="my-site.s3-website-us-east-1.amazonaws.com"'
$ declare "$xxx"
$ echo "$website_endpoint"
"my-site.s3-website-us-east-1.amazonaws.com"

Whenever you have a string which represents a string variable assignment, a safe and simple way to perform that assignment is declare (and Using More Quotes™):

$ xxx='website_endpoint="my-site.s3-website-us-east-1.amazonaws.com"'
$ declare "$xxx"
$ echo "$website_endpoint"
"my-site.s3-website-us-east-1.amazonaws.com"
Source Link
l0b0
  • 53.6k
  • 48
  • 225
  • 398

Whenever you have a string which represents a variable assignment, the Right Way™ to perform that assignment is declare (and Using More Quotes™):

$ xxx='website_endpoint="my-site.s3-website-us-east-1.amazonaws.com"'
$ declare "$xxx"
$ echo "$website_endpoint"
"my-site.s3-website-us-east-1.amazonaws.com"