Run text file as commands in Bash

前端 未结 4 1593
滥情空心
滥情空心 2020-11-29 20:09

If I have a text file with a separate command on each line how would I make terminal run each line as a command? I just don\'t want to have to copy and paste 1 line at a tim

4条回答
  •  独厮守ぢ
    2020-11-29 20:58

    you can also just run it with a shell, for example:

    bash example.txt
    
    sh example.txt
    

提交回复
热议问题