title: Go: execute bash script
body: <p>How do I execute a bash script from my Go program? Here's my code:</p>
  
  <p>Dir Structure:</p>
  
  <pre><code>/hello/
    public/
      js/
        hello.js
    templates
      hello.html
  
    hello.go
    hello.sh
  </code></pre>
  
  <p>hello.go</p>
  
  <pre><code>cmd, err := exec.Command("/bin/sh", "hello.sh")
    if err != nil {
      fmt.Println(err)
  }
  </code></pre>
  
  <p>When I run hello.go and call the relevant route, I get this on my console:</p>
  
  <p><code>exit status 127
  output is</code></p>
  
  <p>I'm expecting ["a", "b", "c"]</p>
  
  <p>I am aware there is a similar question on SO: <a href="https://stackoverflow.com/questions/25834277/executing-a-bash-script-from-golang">Executing a Bash Script from Golang</a>, however, I'm not sure if I'm getting the path correct. Will appreciate help!</p>