.sh

Solved
Anonymous user -  
lami20j Posted messages 21506 Registration date   Status Modérateur, Contributeur sécurité Last intervention   -
Hello,
How to make a .sh executable please?
Whether I use chmod or not (unless there's a chmod error) I get a: bash: xxxx.sh: command not found

Thanks for your insights
Configuration: Windows XP Internet Explorer 7.0

4 réponses

lami20j Posted messages 21506 Registration date   Status Modérateur, Contributeur sécurité Last intervention   3 570
 
Hello,

type
./script.sh
--
106485010510997108
0
Anonymous user
 
script.sh
-> command not found.

Yet if I do 'sh file.sh' it works.
0
lami20j Posted messages 21506 Registration date   Status Modérateur, Contributeur sécurité Last intervention   3 570
 
For more details, look at http://www.commentcamarche.net/faq/sujet 4627 executing a shell script
--
106485010510997108
0
lami20j Posted messages 21506 Registration date   Status Modérateur, Contributeur sécurité Last intervention   3 570
 
script.sh
-> command not found.


I didn't say script.sh
I said
 ./script.sh
--
106485010510997108
0
Anonymous user
 
Indeed, it works... But what I'm looking for is a way to avoid typing unnecessary syntax, so typing 'script.sh', or even just 'script' would be sufficient. I think it's feasible, I used to do it on another distribution

right?
0
jipicy Posted messages 40842 Registration date   Status Modérateur Last intervention   4 898
 
Hello,

Rule n° 1: Read the links that are provided carefully!!!

Example message #2!

;-))
--
JP - Penguin breeder -
Do something for the environment, close your windows and adopt a penguin.
0
Anonymous user > jipicy Posted messages 40842 Registration date   Status Modérateur Last intervention  
 
I went to consult the link, but apparently I didn't manage to make use of the information...

I've added the path, but nothing changes. file.sh doesn't execute by itself; I have to put a sh in front of it.

Alright, I'll read everything carefully again just in case...
0
lami20j Posted messages 21506 Registration date   Status Modérateur, Contributeur sécurité Last intervention   3 570 > Anonymous user
 
0