Open emilwojtaszek opened 6 years ago
With this simple change we can pipe commands, like:
echo "Hello world" | cat
example use:
let pipe = Pipe() // echo "Hello world" let _ = try shellOut(to: "echo", arguments: ["Hello world"], outputHandle: pipe.fileHandleForWriting) // simulate `echo "Hello world" | cat` let output = try shellOut(to: "cat", inputHandle: pipe.fileHandleForReading)
With this simple change we can pipe commands, like:
example use: