У меня есть файл конфигурации, который выглядит следующим образом:
define hostgroup {
hostgroup_name NA-servers ; The name of the hostgroup
alias NA region ; Long name of the group
members sample.com ; hosts belonging to this group
}
define hostgroup{
hostgroup_name FTP-server ; The name of the hostgroup
alias FTP NA region ; Long name of the group
members example.com
}
Мне нужно обновить значение members
в зависимости от hostgroup_name
.
Как мне разобрать вышеуказанный файл?