How do I execute a bash script in Terminal?

后端 未结 9 2074
無奈伤痛
無奈伤痛 2020-12-12 11:50

I have a bash script like:

#!/bin/bash

echo Hello world!

How do I execute this in Terminal?

9条回答
  •  一向
    一向 (楼主)
    2020-12-12 12:40

    And yet one more way

    . /path/to/script
    

    What is the meaning of the dot?

提交回复
热议问题