Linux, how to execute an executable / non-executab

2019-07-20 17:31发布

问题:

In the Linux, how to execute an executable / non-executable file ?

. myfile.sh  --- works, why?
sh myfile.sh -- doesn't work, why ?

Thanks

回答1:

sh ./myfile.sh should work though



回答2:

./myfile.sh --> if the file is +x

Otherwise it wont run.



标签: linux shell