MCPcopy Index your code
hub / github.com/bitfield/script / ExamplePipe_Dirname

Function ExamplePipe_Dirname

script_unix_test.go:191–210  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

189}
190
191func ExamplePipe_Dirname() {
192 input := []string{
193 "",
194 "/",
195 "/root",
196 "/tmp/example.php",
197 "/var/tmp/",
198 "./src/filters",
199 "C:/Program Files",
200 }
201 script.Slice(input).Dirname().Stdout()
202 // Output:
203 // .
204 // /
205 // /
206 // /tmp
207 // /var
208 // ./src
209 // C:
210}
211
212func ExamplePipe_Exec() {
213 script.Echo("Hello, world!").Exec("tr a-z A-Z").Stdout()

Callers

nothing calls this directly

Calls 3

SliceFunction · 0.92
StdoutMethod · 0.80
DirnameMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…