MacOS – problems installing homebrew on mavericks

homebrewmacosterminal

I tried to install homebrew (OSX 10.9.5) using the recommended

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

but got

Illegal variable name.

I do have macports installed, so perhaps some commands do not what they are meant to?? But note that ruby is /usr/bin/ruby and curl is /usr/bin/curl.

How can I overcome this problem?

Best Answer

The problem lies with usage of tcsh as underlying shell. tcsh does not support $() as a syntax for command substituion. When using bash instead, it works just fine.