Running Executable from Shell Script

青春壹個敷衍的年華 提交于 2019-11-29 14:31:18

Your newlines are goofed. Use dos2unix to fix.

why don't you try using the full path? e.g., if myProgram is in /home/user1/bin, you can try /home/user1/bin/myProgram instead of ./myProgram. This should work.

You can also add the path to path variable, $PATH and directly call myProgram from anywhere.

Run "export PATH=$PATH:/home/user1/bin" on your terminal without the quotes. Note that this affects only your current termial session. If you want to permanently add the path, update your .bashrc file in your home directory with the following line:

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!