tweaks
This commit is contained in:
parent
d3bc797a70
commit
27ce28247b
@ -1,6 +1,5 @@
|
||||
# When we run our program it is replaced by `ls`.
|
||||
$ go run execing-processes.go
|
||||
$ ls -a -l -h
|
||||
total 16
|
||||
drwxr-xr-x 4 mark 136B Oct 3 16:29 .
|
||||
drwxr-xr-x 91 mark 3.0K Oct 3 12:50 ..
|
||||
|
@ -31,8 +31,8 @@ func main() {
|
||||
fmt.Println(string(dateOut))
|
||||
|
||||
// Next we'll look at a slightly more involved case
|
||||
// where we pipe data to the exteranl process on its
|
||||
// `stdin` and collect the results from `stdout`.
|
||||
// where we pipe data to the external process on its
|
||||
// `stdin` and collect the results from its `stdout`.
|
||||
grepCmd := exec.Command("grep", "hello")
|
||||
|
||||
// Here we explicitly grab input/output pipes, start
|
||||
|
@ -1,5 +1,5 @@
|
||||
# The spawned programs return output that is the same
|
||||
# as if we had run them directly form the comand-line.
|
||||
# as if we had run them directly from the command-line.
|
||||
$ go run spawning-processes.go
|
||||
> date
|
||||
Wed Oct 10 09:53:11 PDT 2012
|
||||
|
Loading…
x
Reference in New Issue
Block a user