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?
#!/bin/sh
(instead of#!/bin/bash
) unless you know that you are usingbash
features. – G-Man Says 'Reinstate Monica' Aug 11 '15 at 04:10sh
when I know I'm not using bash features). – goldilocks Aug 11 '15 at 08:53which bash
is helpful. That returns/bin/bash
. At the top of my Bash script I add#!/bin/bash
. Then when I want to run the Bash script, I enterbash foo.sh
. Sowhich sh
is used the same way.sh foo.sh
– noobninja Jul 18 '16 at 09:26/bin/sh
is something other than Bash and there are unnoticed Bashisms in the script). See here. – Wildcard Nov 23 '16 at 07:33