MCPcopy
hub / github.com/bitfield/script / ExamplePipe_Column

Function ExamplePipe_Column

script_test.go:2258–2271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2256}
2257
2258func 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
2273func ExamplePipe_Concat() {
2274 input := []string{

Callers

nothing calls this directly

Calls 3

SliceFunction · 0.92
StdoutMethod · 0.80
ColumnMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…