mirror of
https://github.com/dylanaraps/pure-bash-bible.git
synced 2025-09-09 14:40:44 +02:00
docs: update
This commit is contained in:
@@ -679,6 +679,8 @@ allows us to effectively remove array duplicates.
|
|||||||
|
|
||||||
**CAVEAT:** Requires `bash` 4+
|
**CAVEAT:** Requires `bash` 4+
|
||||||
|
|
||||||
|
**CAVEAT:** List order may not stay the same.
|
||||||
|
|
||||||
**Example Function:**
|
**Example Function:**
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
5
test.sh
5
test.sh
@@ -75,11 +75,6 @@ test_reverse_array() {
|
|||||||
shopt -u compat44
|
shopt -u compat44
|
||||||
}
|
}
|
||||||
|
|
||||||
test_remove_array_dups() {
|
|
||||||
IFS=$'\n' read -d "" -ra result < <(remove_array_dups 1 1 2 2 3 3 4 5)
|
|
||||||
assert_equals "${result[*]}" "1 2 3 4 5"
|
|
||||||
}
|
|
||||||
|
|
||||||
test_cycle() {
|
test_cycle() {
|
||||||
# shellcheck disable=2034
|
# shellcheck disable=2034
|
||||||
arr=(a b c d)
|
arr=(a b c d)
|
||||||
|
Reference in New Issue
Block a user