This is a known limitation in bash 3.2. To work around it:
source /dev/stdin <<<"$(echo bar=bar)"
…or, similarly:
source /dev/stdin <<<"$(cat <(...))"
More Related Contents:
- How to concatenate string variables in Bash
- How do I iterate over a range of numbers defined by variables in Bash?
- Difference between single and double quotes in Bash
- Why should there be spaces around ‘[‘ and ‘]’ in Bash?
- Dynamic variable names in Bash
- How to escape single quotes within single quoted strings
- How to use double or single brackets, parentheses, curly braces
- When do we need curly braces around shell variables?
- Are double square brackets [[ ]] preferable over single square brackets [ ] in Bash?
- Brace expansion with variable? [duplicate]
- What is the benefit of using $() instead of backticks in shell scripts? [duplicate]
- Usage of :- (colon dash) in bash
- Why equal to operator does not work if it is surrounded by space?
- What is the purpose of “&&” in a shell command?
- Tilde in path doesn’t expand to home directory
- Bash syntax error: unexpected end of file
- Test for non-zero length string in Bash: [ -n “$var” ] or [ “$var” ]
- What is the meaning of the ${0##…} syntax with variable, braces and hash character in bash?
- Ternary operator (?:) in Bash
- Capture stdout to a variable but still display it in the console
- Compound ‘if’ statements with multiple expressions in Bash
- What is the difference between ${var}, “$var”, and “${var}” in the Bash shell?
- Using the && operator in an if statement
- How to escape history expansion exclamation mark ! inside a double quoted string?
- bash: $[] vs. $(())
- osascript using bash variable with a space
- How to suppress variable substitution in bash heredocs
- Why equal to operator does not work if it is not surrounded by space?
- Rsync syntax error when run from bash script
- What is the proper way to test a Bash function’s return value?