Running Executable from Shell Script

前端 未结 2 796
礼貌的吻别
礼貌的吻别 2020-12-21 01:46

I am having trouble launching an executable that I have created from a shell script. I would like to automate testing by running the program many times with different comma

相关标签:
2条回答
  • 2020-12-21 02:21

    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:

    0 讨论(0)
  • 2020-12-21 02:31

    Your newlines are goofed. Use dos2unix to fix.

    0 讨论(0)
提交回复
热议问题