renumber
This commit is contained in:
17
070-spawn/spawn.go
Normal file
17
070-spawn/spawn.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// ## Spawn
|
||||
|
||||
package main
|
||||
|
||||
import ("os/exec"; "fmt")
|
||||
|
||||
func main() {
|
||||
cmd := exec.Command("ls", "-a", "-l")
|
||||
out, err := cmd.Output()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
fmt.Println("Files:")
|
||||
fmt.Print(string(out))
|
||||
}
|
||||
|
||||
// todo: full command lines with bash
|
||||
6
070-spawn/spawn.sh
Normal file
6
070-spawn/spawn.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
$ go run spawn.go
|
||||
Files:
|
||||
total 8
|
||||
drwxr-xr-x 3 mmcgrana staff 102 Sep 23 11:35 .
|
||||
drwxr-xr-x 101 mmcgrana staff 3434 Sep 23 11:25 ..
|
||||
-rw-r--r--@ 1 mmcgrana staff 241 Sep 23 11:37 spawn.go
|
||||
Reference in New Issue
Block a user