test1.go
package main
import
(
“bytes”
“fmt”
“os/exec”
“strings”
“log”
)
func main()
{
cmd := exec.Command("bash", "test.sh");
cmd.Stdin = strings.NewReader("");
var out bytes.Buffer;
cmd.Stdout = &out;
err := cmd.Run();
if err != nil {
log.Fatal(err);
}
fmt.Printf("Output : ", out.String());
}
test.sh
echo “Hello world”
My query
when trying to run .go file i.e., go run test1.go
i am getting “bash”:executable not found or %PATH% not found error
so plzz asap help me with this