Server Fault is a question and answer site for system and network administrators. 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 want to do

/usr/bin/bash -args

which, as it stands, runs the script but doesn't pass the args to it. I realize that the conventional syntax is simply

./ -args

but I'm curious as to what I need to do in order to call the script from bash explicitly.

share|improve this question
Works fine here. – Ignacio Vazquez-Abrams Jun 11 '10 at 21:16
Works fine for me. Perhaps if you showed your script we'd be better able to diagnose the problem. Also, what version of Bash? – Dennis Williamson Jun 11 '10 at 21:49

Try running the script in debug output mode

/usr/bin/bash --verbose -args
share|improve this answer

Please provide information about your operating system. Having 'bash' located at "/usr/bin/bash" tips me off that you're probably not running one of the more common GNU/Linux distributions.

On that note, what does the she-bang of the script look like? If it's any different from the following, then you're not doing the equivalent with your bash command:


One other suggestion I can pull out of the blue is to try escaping the parameters to bash, just in case there's some strange getopt thing going on.

/usr/bin/bash -- -args
share|improve this answer
And change permission so the file can be executed: chmod a+x file (or u+x if you want make it executable only to the user) – Pier Jul 12 '10 at 7:13

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.