Revision 12706
Added by Aaron Marcuse-Kubitza almost 11 years ago
util.sh | ||
---|---|---|
331 | 331 |
starts_with 'declare -a' "$decl" # also matches -ax |
332 | 332 |
} |
333 | 333 |
|
334 |
#### paths |
|
335 |
|
|
336 |
strip/() { echo "${1%/}"; } # strips trailing /s |
|
337 |
|
|
338 |
wildcard/() # usage: array=($([clog++ cd ...;] wildcard/ unquoted_pattern...)) |
|
339 |
{ cmd=strip/ foreach_arg; esc_args "$@"; } |
|
340 |
|
|
334 | 341 |
#### streams |
335 | 342 |
|
336 | 343 |
pipe_delay() # usage: cmd1 | { pipe_delay; cmd2; } |
Also available in: Unified diff
lib/sh/util.sh: added wildcard/()