Revision 9808
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/util.sh | ||
---|---|---|
123 | 123 |
# usage: cmd=... foreach_arg |
124 | 124 |
function foreach_arg() |
125 | 125 |
{ |
126 |
echo_func; kw_params cmd; : "${cmd:?}"; local a
|
|
127 |
for a in "$@"; do |
|
126 |
echo_func; kw_params cmd; : "${cmd:?}" |
|
127 |
local a; for a in "$@"; do
|
|
128 | 128 |
a="$(clog++ echo_run "$cmd" "$a")" || return; args+=("$a") |
129 | 129 |
done |
130 | 130 |
echo_vars args |
Also available in: Unified diff
lib/sh/util.sh: foreach_arg(): moved `local a` to same line as for loop that uses it