FAQ
You can do it like this:

  $ cat count.sh
#!/usr/bin/env bash

for x in {1..3}; do
     echo $x
     sleep 1
done

  $ cat main.go
package main

import (
"os"
"os/exec"
)

func main() {
cmd := exec.Command("./count.sh")
cmd.Stdout = os.Stdout
cmd.Run()
}

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 5 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMay 13, '16 at 5:43a
activeMay 14, '16 at 1:07a
posts5
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase