Search code examples
bashterminal

How do I execute a bash script in Terminal?


I have a bash script like:

#!/bin/bash

echo Hello world!

How do I execute this in Terminal?


Solution

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