func main() { p := pipe.Line( pipe.ReadFile("./test.txt"), pipe.Exec("lpr"), ) output, err := pipe.CombinedOutput(p) if err != nil { fmt.Printf("%v\n", err) } fmt.Printf("%s", output) }
func main() { output, err := pipe.CombinedOutput( pipe.Line( pipe.Exec("ls", "-la", "/usr/bin"), pipe.System("grep pp"), pipe.WriteFile("grep.txt", 0644), ), ) if err != nil { log.Fatal(err) } println(string(output)) }