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

Function ExamplePipe_Basename

script_unix_test.go:170–189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

168}
169
170func ExamplePipe_Basename() {
171 input := []string{
172 "",
173 "/",
174 "/root",
175 "/tmp/example.php",
176 "/var/tmp/",
177 "./src/filters",
178 "C:/Program Files",
179 }
180 script.Slice(input).Basename().Stdout()
181 // Output:
182 // .
183 // /
184 // root
185 // example.php
186 // tmp
187 // filters
188 // Program Files
189}
190
191func ExamplePipe_Dirname() {
192 input := []string{

Callers

nothing calls this directly

Calls 3

SliceFunction · 0.92
StdoutMethod · 0.80
BasenameMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…