Run bash commands from txt file

前端 未结 4 699
耶瑟儿~
耶瑟儿~ 2020-12-08 00:11

I have some commands in txt file and I need to execute all them line by line. How could I do it?

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-08 00:30

    Change the extension to .sh and for the first line #!/usr/bin/env bash and as someone else said chmod +x

提交回复
热议问题