Results 1 to 4 of 4
Hello,
When I try to run a script like this, it failed:
$ ./hello_world.sh
bash: ./hello_world.sh: /bin/sh: bad interpreter: Permission non accordée
I must run the script like this:
$ ...
- 09-25-2010 #1Just Joined!
- Join Date
- Sep 2010
- Posts
- 6
[SOLVED] Problem running scripts
Hello,
When I try to run a script like this, it failed:
$ ./hello_world.sh
bash: ./hello_world.sh: /bin/sh: bad interpreter: Permission non accordée
I must run the script like this:
$ bash ./hello_world.sh
Hello World!
This is the script:
$ cat hello_world.sh
#!/bin/sh
echo Hello World!
These are the permissions:
$ ls -l hello_world.sh
-rwxr-xr-x 1 yugiohjcj yugiohjcj 28 Sep 25 18:23 hello_world.sh
And this is my user identity:
$ id
uid=1000(yugiohjcj) gid=1000(yugiohjcj) groups=20(dialout),24(cdrom),25(floppy),29(audio), 44(video),46(plugdev),1000(yugiohjcj)
Can you explain me why I can't run this script like the first try?
Thank you.
- 09-25-2010 #2Respectfully... Sarlac II
~~
The moving clock K' appears to K to run slow by the factor (1-v^2/c^2)^(1/2).
This is the phenomenon of time dilation.
The faster you run, the younger you look, to everyone but yourself.
- 09-26-2010 #3Just Joined!
- Join Date
- Sep 2010
- Posts
- 6
It doesn't resolve the problem.
This is the new content of the script:
$ cat hello_world.sh
#!/bin/bash
echo Hello World!
And when I try to run it like this:
$ ./hello_world.sh
bash: ./hello_world.sh: /bin/bash: bad interpreter: Permission non accordée
But if I run it like this:
$ bash ./hello_world.sh
Hello World!
Can you help me to run my script like the first try?
- 09-26-2010 #4Just Joined!
- Join Date
- Sep 2010
- Posts
- 6
I found the solution on the Internet: edit my /etc/fstab file.
I must replace this:
eeepc.geekdomain:/home /home nfs defaults,user 0 0
by this:
eeepc.geekdomain:/home /home nfs defaults,user,exec 0 0
The 'exec' option is what I need
Problem resolved.




