sort and clean
This commit is contained in:
parent
765a56a048
commit
ffd0d1aaeb
@ -35,7 +35,8 @@ do
|
|||||||
# printf '%s\0' "${containers[@]}" | grep -Fxqz -- "$(echo "$search" | grep "$pod" | awk '{print $4}' | tr -d " \t\r ")" && continue
|
# printf '%s\0' "${containers[@]}" | grep -Fxqz -- "$(echo "$search" | grep "$pod" | awk '{print $4}' | tr -d " \t\r ")" && continue
|
||||||
echo "$search" | grep "$pod" | awk '{print $4}' | tr -d " \t\r " >> cont_file
|
echo "$search" | grep "$pod" | awk '{print $4}' | tr -d " \t\r " >> cont_file
|
||||||
done
|
done
|
||||||
mapfile -t containers < "$(sort -u cont_file)"
|
clean_list=$(sort -u cont_file)
|
||||||
|
mapfile -t containers < "$clean_list"
|
||||||
rm cont_file 2> /dev/null
|
rm cont_file 2> /dev/null
|
||||||
case "${#containers[@]}" in
|
case "${#containers[@]}" in
|
||||||
0)
|
0)
|
||||||
|
Loading…
Reference in New Issue
Block a user