Bash Command Substitution: $() vs Backticks
Why $(...) runs in a subshell, so cd and variables vanish, why backticks nest badly, and the process substitution tricks that keep state in your shell.
Filtering by topic #shell-scripting · clear
Why $(...) runs in a subshell, so cd and variables vanish, why backticks nest badly, and the process substitution tricks that keep state in your shell.
Bash names the token it could not parse. Read it to find the cause: a pasted <file>, a missing then or do, CRLF line endings, or an HTML page piped into bash.