What is this directory "$(brew --prefix)"? (homebrew)

Hello,

I installed the package manager called homebrew a few days ago. Everything seems to be working fine but today I've just noticed this funny looking directory $(brew --prefix). I'm not sure if I made a mistake and duplicated this directory from somewhere else, or if it's suppose to be there.

MBP:~ m$ pwd
/Users/m
MBP:~ m$ ls -ltr
total 40
  ...other files and dirs
drwxr-xr-x   8 m     staff   272 Jun  8 03:49 $(brew --prefix)
MBP:~ m$ ls $(brew --prefix)
Cellar    Library   README.md bin       etc       include   lib       share

Executing the the brew commands "Display the real path to your Homebrew prefix" and "Display the real path to your Homebrew Cellar

MBP:~ m$ brew --prefix
/usr/local
MBP:~ m$ brew --cellar
/usr/local/Cellar

So Looking at this, is /Users/m/$(brew --prefix) a redundant duplicate I somehow made which I can now delete? Or is that dollar sign in front of a directory name meaning something else I am not understanding?

Thanks, Michelle

It looks like an installer error, the $(...) notation is similar to the `...` backtick notation. Try

touch homedir \$\(brew\ --prefixs\)
ls $(brew-prefix)

If homedir is in the listing then your shell doesn't support the $(...) expansion (though it should as this is in the Posix std AFAIK

Thanks Skrynesaver. Yes homedir was there I'm afraid.

I went ahead and deleted the directory. Homebrew appears to be working as per usual (so far).

MBP:~ m$ which brew
/usr/local/bin/brew
MBP:~ m$ brew --version
0.8

Unless you changed your shell to something else, MacOS's default shell (bash) quite definitely supports $() notation.

On shells that don't support it, it would be a syntax error, it wouldn't just use it literally. They'd have to put it into single quotes or escape everything to make it do that.

So I suspect a bad script or typing mistake, not an incompatible shell.