()
| 2271 | } |
| 2272 | |
| 2273 | func ExamplePipe_Concat() { |
| 2274 | input := []string{ |
| 2275 | "testdata/test.txt", |
| 2276 | "testdata/doesntexist.txt", |
| 2277 | "testdata/hello.txt", |
| 2278 | } |
| 2279 | script.Slice(input).Concat().Stdout() |
| 2280 | // Output: |
| 2281 | // This is the first line in the file. |
| 2282 | // Hello, world. |
| 2283 | // This is another line in the file. |
| 2284 | // hello world |
| 2285 | } |
| 2286 | |
| 2287 | func ExamplePipe_CountLines() { |
| 2288 | n, err := script.Echo("a\nb\nc\n").CountLines() |