CDE
This commit is contained in:
parent
518da4a923
commit
764da6cbbb
6144 changed files with 83610 additions and 11 deletions
13
Task/Execute-a-system-command/Go/execute-a-system-command.go
Normal file
13
Task/Execute-a-system-command/Go/execute-a-system-command.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
package main
|
||||
import "fmt"
|
||||
import "os/exec"
|
||||
|
||||
func main() {
|
||||
cmd := exec.Command("ls", "-l")
|
||||
output, err := cmd.Output()
|
||||
if (err != nil) {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
fmt.Print(string(output))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue