Shell script not running, command not found

后端 未结 12 1805
天涯浪人
天涯浪人 2020-12-03 04:37

I am very, very new to UNIX programming (running on MacOSX Mountain Lion via Terminal). I\'ve been learning the basics from a bioinformatics and molecular methods course (we

12条回答
  •  一生所求
    2020-12-03 05:26

    Change the first line to the following as pointed out by Marc B

    #!/bin/bash 
    

    Then mark the script as executable and execute it from the command line

    chmod +x MigrateNshell.sh
    ./MigrateNshell.sh
    

    or simply execute bash from the command line passing in your script as a parameter

    /bin/bash MigrateNshell.sh
    

提交回复
热议问题