Re: [go-nuts] Does os.exec work ?

2020-03-25 Thread lgodio2
Than you.. I surely need to beef-up my comprehension of what os.exec does vs what it does not. On Wednesday, March 25, 2020 at 2:54:07 PM UTC-4, Kurtis Rader wrote: > > The exec.Command() function works fine. The problem lies in your > understanding of what happens when you use a shell to

Re: [go-nuts] Does os.exec work ?

2020-03-25 Thread Kurtis Rader
The exec.Command() function works fine. The problem lies in your understanding of what happens when you use a shell to execute that command versus what the Go function does. When you type that command at a shell prompt it parses the statement and creates a pipe and runs "echo" on the LHS and

Re: [go-nuts] Does os.exec work ?

2020-03-25 Thread Jan Mercl
On Wed, Mar 25, 2020 at 7:30 PM 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

[go-nuts] Does os.exec work ?

2020-03-25 Thread lgodio2
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... import ( "fmt"; "os"; "os/exec"; ) func main() { cb := "ABCD" cmd := exec.Command ("echo", "echo "+ "'" +string(cb [0:len(cb)-1] ) +"'",