I am trying to run the following command:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
but getting:
Illegal variable name.
How to fix it?
First never run script downloaded like that. You never know what it is going to execute on your system.
curl -O https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
bash install.sh
I checked this install script code and it is not passing shellcheck.net static analysis. So its authors have more homework to do.