mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-27 21:54:19 +01:00
added sort
Alphabetical sorting of the container lists.
This commit is contained in:
parent
05c7c8f0dd
commit
22c8d5e423
1 changed files with 7 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
### VERSION v.0.1.0
|
### VERSION v.0.1.1
|
||||||
|
|
||||||
### DOCKER RUN - VERSION
|
### DOCKER RUN - VERSION
|
||||||
|
|
||||||
|
|
@ -105,6 +105,12 @@ for i in $(docker ps --filter "name=$SearchName" --format '{{.Names}}') ; do
|
||||||
fi
|
fi
|
||||||
done
|
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:
|
### Create new Array to use for the numbered list:
|
||||||
NumberedUpdates=(ALL "${GotUpdates[@]}")
|
NumberedUpdates=(ALL "${GotUpdates[@]}")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue