mirror of
https://github.com/mag37/dockcheck.git
synced 2026-04-21 03:40:39 +00:00
re-written sorting of arrays
This commit is contained in:
+4
-5
@@ -240,11 +240,10 @@ for i in $(docker ps $Stopped --filter "name=$SearchName" --format '{{.Names}}')
|
|||||||
done
|
done
|
||||||
|
|
||||||
### Sort arrays alphabetically
|
### Sort arrays alphabetically
|
||||||
IFS=$'\n'
|
readarray -td '' NoUpdates < <(printf '%s\0' "${NoUpdates[@]}" | sort -z -n)
|
||||||
NoUpdates=($(sort <<<"${NoUpdates[*]}"))
|
readarray -td '' GotUpdates < <(printf '%s\0' "${GotUpdates[@]}" | sort -z -n)
|
||||||
GotUpdates=($(sort <<<"${GotUpdates[*]}"))
|
readarray -td '' GotErrors < <(printf '%s\0' "${GotErrors[@]}" | sort -z -n)
|
||||||
GotErrors=($(sort <<<"${GotErrors[*]}"))
|
|
||||||
unset IFS
|
|
||||||
### Define how many updates are available
|
### Define how many updates are available
|
||||||
UpdCount="${#GotUpdates[@]}"
|
UpdCount="${#GotUpdates[@]}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user