On Wed, Mar 25, 2020 at 7:30 PM <lgod...@gmail.com> wrote: > > This simple command works correctly when submitted via the terminal, but the > same command submitted to os.exec does not !! > .. and I can`t understand why...
os.Exec does not pass commands to the shell, but it is the case in the terminal. Try something like this (not tested) cmd := exec.Command("sh", "-c", "echo foo bar | tee test") // Just an example, this is not fixing your code. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-XR1-SEHQsNNDQ4bqSxLRY7DV-Zm%2Bi17%2B63-RqNU9j4Kg%40mail.gmail.com.