summaryrefslogtreecommitdiff
path: root/example1/main.go
blob: 4a3650365ce5076038b40fd84b25756095e8ea7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main

/*
import "log"
import "reflect"
import "os"
*/

// import "github.com/davecgh/go-spew/spew"

import "git.wit.com/jcarr/shell"

func main() {
	shell.SpewOn()

	shell.Run("ls /tmp")

	shell.Run("ping -c 4 localhost")

	// slow down the polling to every 2 seconds
	shell.SetDelayInMsec(2000)
	shell.Run("ping -c 4 localhost")

	// TODO: this might not be working
	// check error handling
	shell.Run("ls /tmpthisisnothere")
}