Having an issue with the double parsing of local variables that contain spaces. Two parts to this: what's the best way to initialize strings with spaces, ie which quotes to use, and how do they get escaped as part of a command? See the following example...
Let's say we create a command in the script section as
- export AUTHOR="My name goes here"
Are double quotes what should be used?
Next, we have a separate command that will use that variable as a parameter
- madeupcommand --author "$AUTHOR"
Here I'm escaping the $AUTHOR variable based on Atlassian documentation (https://confluence.atlassian.com/bitbucket/advanced-techniques-for-writing-pipes-969511009.html). However, made up command only receives My. I've tried escaping $AUTHOR with various quotes and escape combinations but can't get the whole string to get passed in. How should $AUTHOR be escaped then?
More generally, is there any documentation discussing how quotes are interpreted as single quote, double quote, and accents all do different things?
Thanks!
Community moderators have prevented the ability to post new answers.