diff options
| author | ruki <[email protected]> | 2022-12-20 23:40:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-12-20 23:40:04 +0800 |
| commit | 2aa33d36befec02328950d064f74bc1cc97f81f7 (patch) | |
| tree | d81791b0ae607e9345fc29f24c360d14f7421fba | |
| parent | 717831ead1655295513535083cec27ed0bdcda4f (diff) | |
fix configure for dash
| -rwxr-xr-x | configure | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -462,8 +462,9 @@ _dedup() { # .e.g "hello world hello how are you world" -> hello how are you world _dedup_reverse() { local result="" - local list=$(echo "${1}" | awk '{for (i = NF; i > 0; --i) if (!seen[$i]++) printf $i " "}') + local list="" local item="" + list=$(echo "${1}" | awk '{for (i = NF; i > 0; --i) if (!seen[$i]++) printf $i " "}') for item in ${list}; do result="${item} ${result}" done |
