Skip to content

How do I execute existing bash scripts #3810

Answered by kubouch
thesobercoder asked this question in Q&A
Discussion options

You must be logged in to vote

I think there are two options:

  1. run bash script.bash
  2. put a "shebang" line at the first line of the script: #!/usr/bin/env bash, make sure it's executable: chmod +x script.bash and then just execute it: ./script.bash.

This is based on Linux. Not sure if 2. would work on Git bash on Windows, but at least the first one should work.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by thesobercoder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants