Where is POSIX Ex editor on Mac? Since Ex is a standard Unix editor (standardized by POSIX), I expect to be shipped with OS X, however it's linked into vim instead as shown below:

$ stat /usr/bin/ex
  File: ‘/usr/bin/ex’ -&gt; ‘vim’


My goal is to test some syntax within Ex it-self (not using extended vim-like ex syntax) in order to check if my command is POSIX-compliant.

Therefore where I can find the original Ex editor on OS X? Or if it was removed or not shipped with, how can I get it back?
You could install it using Homebrew.
It is part of the brew ex-vi package, e.g.:

brew install ex-vi