Created
August 20, 2019 02:53
-
-
Save 5a494d/613ec74f35737759b8c289db9b6eb60d to your computer and use it in GitHub Desktop.
docker.container.iterator.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
list=$(docker ps) | |
IFS=$'\n' array=($list) | |
for index in "${!array[@]}" | |
do | |
declare -a a=("${array[index]}") | |
printf "%s\n" "${a[@]}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment