()
| 2256 | } |
| 2257 | |
| 2258 | func ExamplePipe_Column() { |
| 2259 | input := []string{ |
| 2260 | "PID TT STAT TIME COMMAND", |
| 2261 | " 1 ?? Ss 873:17.62 /sbin/launchd", |
| 2262 | " 50 ?? Ss 13:18.13 /usr/libexec/UserEventAgent (System)", |
| 2263 | " 51 ?? Ss 22:56.75 /usr/sbin/syslogd", |
| 2264 | } |
| 2265 | script.Slice(input).Column(1).Stdout() |
| 2266 | // Output: |
| 2267 | // PID |
| 2268 | // 1 |
| 2269 | // 50 |
| 2270 | // 51 |
| 2271 | } |
| 2272 | |
| 2273 | func ExamplePipe_Concat() { |
| 2274 | input := []string{ |