added sort

Alphabetical sorting of the container lists.
This commit is contained in:
mag37 2023-02-01 19:41:56 +01:00 committed by GitHub
parent 05c7c8f0dd
commit 22c8d5e423
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
#!/bin/bash
### VERSION v.0.1.0
### VERSION v.0.1.1
### DOCKER RUN - VERSION
@ -105,6 +105,12 @@ for i in $(docker ps --filter "name=$SearchName" --format '{{.Names}}') ; do
fi
done
### Sort arrays alphabetically
IFS=$'\n'
NoUpdates=($(sort <<<"${NoUpdates[*]}"))
GotUpdates=($(sort <<<"${GotUpdates[*]}"))
GotErrors=($(sort <<<"${GotErrors[*]}"))
unset IFS
### Create new Array to use for the numbered list:
NumberedUpdates=(ALL "${GotUpdates[@]}")