Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm on a kali linux 64 bit.

I have created a python script which takes 2 arguments to start. I don't want to type out every time the exact same paths or search in the history of the commands I used in terminal. So I decided to create a simple script which calls the python script with its arguments.

#! /bin bash

python CreateDB.py ./WtfPath ./NoWtfPath/NewSystem/

It is the exact same command I would use in terminal. However, I get an error message when I try to execute the script file.

bash: ./wtf.sh: /bin: bad interpreter: Permission denied

wtf.sh has executable rights.

What is wrong?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You have a space instead of a forward slash here:

#! /bin bash

Should be:

#! /bin/bash

The shebang (#!) should be followed by the path to an executable, which may be followed by arguments, e.g.:

#!/usr/bin/env sh

In this case /usr/bin/env is the executable, see man env for details. But just /bin refers to a directory.

share|improve this answer
    
damn, silly me! Thanks! Didn't see that... –  Davlog Jul 13 at 19:05

Your Answer

 
discard

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.