Revision 9080
Added by Aaron Marcuse-Kubitza over 11 years ago
util.sh | ||
---|---|---|
90 | 90 |
reverse() # usage: array=($(reverse args...)) |
91 | 91 |
{ |
92 | 92 |
local i |
93 |
for (( i=$#; i >= 1; i-- )); do printf '%q ' "${!i}"; done
|
|
93 |
for (( i=$#; i > 0; i-- )); do printf '%q ' "${!i}"; done
|
|
94 | 94 |
} |
95 | 95 |
|
96 | 96 |
|
Also available in: Unified diff
lib/sh/util.sh: reverse(): use `i > 0` rather than `i >= 1` to match the `i < length` idiom used in forwards loops