renumber again
This commit is contained in:
18
072-exec/exec.go
Normal file
18
072-exec/exec.go
Normal file
@@ -0,0 +1,18 @@
|
||||
// ## Exec
|
||||
|
||||
package main
|
||||
|
||||
import "syscall"
|
||||
import "os"
|
||||
import "os/exec"
|
||||
|
||||
func main() {
|
||||
binary, lookErr := exec.LookPath("ls")
|
||||
if lookErr != nil {
|
||||
panic(lookErr)
|
||||
}
|
||||
execErr := syscall.Exec(binary, []string{"-a", "-l", "-h"}, os.Environ())
|
||||
if execErr != nil {
|
||||
panic(execErr)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user