Просьба помочь! имеется вложенный массив
id_equipment_num='5'
ip="728d25af6e8d:192.168.0.2,
fb44c11c1f29:192.168.0.3,
9e276580d749:192.168.0.4"
declare -A wow=(
[$id_equipment_num]=$ip
)
IFS=,
for id_equipment in ${!wow[@]}
do
for ip_equipment in ${wow[$id_equipment]}
do
echo $id_equipment $ip_equipment
done
done
Результат:
- 5 728d25af6e8d:192.168.0.2
- 5 fb44c11c1f29:192.168.0.3
- 5 9e276580d749:192.168.0.4
Необходимо разделить mac, и ip на переменные
echo $id_equipment $mac_equipment $ip_equipment