How do I execute a bash script in Terminal?

后端 未结 9 2024
無奈伤痛
無奈伤痛 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:19

    $prompt: /path/to/script and hit enter. Note you need to make sure the script has execute permissions.

提交回复
热议问题