parses groups of groups

This commit is contained in:
Romain Bossart
2015-04-18 08:19:41 +02:00
parent 3bfd530fda
commit ec0535a255
2 changed files with 6 additions and 4 deletions
+3 -2
View File
@@ -72,9 +72,10 @@ __ll_group_list () {
local -a group_list
group_list=$(command \
cat ${HOST_FILE} \
| awk '$1 ~ /^\[.*\]$/ && !/[:=]/ { gsub(/[\[\]]/, "", $1); print $1 }' \
| awk '$1 ~ /^\[.*\]$/ && !/=/ && !/:vars/ \
{ gsub(/[\[\]]/, "", $1); gsub(/:children/, "", $1) ; print $1 }' \
| uniq )
echo ${group_list}
}