Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am getting a weird error with the mvim script that is supposed to start the MacVim interface.

See below for the issue. /bin/sh is just fine, mvim was chmod +x'd, other /bin/sh scripts run fine... I'm at a loss here.

jan@MacBook-Pro ~ $ file Applications/mvim 
Applications/mvim: POSIX shell script text executable
jan@MacBook-Pro ~ $ head Applications/mvim 
# This shell script passes all its arguments to the binary inside the
# application bundle.  If you make links to this script as view,
# gvim, etc., then it will peek at the name used to call it and set options
# appropriately.
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic.  This
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico
# Weber and Bjorn Winckler, Aug 13 2007).
jan@MacBook-Pro ~ $ chmod +x Applications/mvim
jan@MacBook-Pro ~ $ Applications/mvim 
-bash: Applications/mvim: /bin/sh: bad interpreter: Operation not permitted

Below you can see that /bin/sh scripts run fine...

jan@MacBook-Pro ~ $ vim
jan@MacBook-Pro ~ $ chmod +x 
jan@MacBook-Pro ~ $ ./ 
jan@MacBook-Pro ~ $ cat 

echo "hi"
share|improve this question
up vote 3 down vote accepted

Hmm, so it seems OS X thought it was a good idea to quarantine my script, for some reason, and not tell me about it.

jan@MacBook-Pro ~ $ xattr -d Applications/mvim 

fixes the issue.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.