parses groups of groups

This commit is contained in:
Romain Bossart 2015-03-07 08:17:59 +01:00
parent 3bfd530fda
commit ec0535a255
2 changed files with 6 additions and 4 deletions

View File

@ -73,9 +73,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}
}

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}
}