Revision 10019
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/util.sh | ||
---|---|---|
234 | 234 |
|
235 | 235 |
echo1() { echo "$1"; } # usage: echo1 values... |
236 | 236 |
|
237 |
# usage: split delim str; use ${parts[@]} |
|
238 |
function split() { echo_func; local IFS="$1"; parts=($2); echo_vars parts; } |
|
239 |
alias split='declare parts; "split"' |
|
240 |
|
|
237 | 241 |
join() { local IFS="$delim"; echo "$*"; } # usage: delim=... join elems... |
238 | 242 |
|
239 | 243 |
reverse() # usage: array=($(reverse args...)) |
Also available in: Unified diff
lib/sh/util.sh: added split()