Can't run bash script

Hello Friends.

I create simple bash script(it name - for example, start)


ifconfig en0

Then I put it in directory /fs/hd0-qnx6/x86/bin(this directory present in PATH enviroment variable)
Then I chmod it. invoke “chmod 777 start”.

When I type “start” - No such file or directory.
When I type (/fs/hd0-qnx6/x86/bin/start)- No such file or directory
When I type “sh start” - same result
When I type “sh /fs/hd0-qnx6/x86/bin/start” - same result

Then I type “cd /fs/hd0-qnx6/x86/bin”
Then try to invoke “./start” - unsuccessfully.

What I do wrong??? Please Help.

try changing the name and see if that helps. “start” may be being used somewhere else.

I change name, nothing change


please check if the line termination of your script file is LF (and not CR/LF).

You can use the utility textto to convert the file.


By principle you should not put something in an x86/bin, you should consider it “reserved”. It has nothing to do with you problem but it’s good practice. Instead use /opt/bin. One of the advantage of doing this is that you can easely see what was added to the default system.

QNX doesn’t use bash shell it uses the korn shell. Again not related to your problem as your script doesn’t appear to use bash specify feature.

I’m surprise PATH points to /fs/hd0/… is that something you did?

Try doing chmod with the full path ( in your example you mentions doing chmod first and THEN doing a cd), and then try to start it with full path. This HAS to work. Unless maybe there is no /bin/sh.