История изменений
Исправление Rot1, (текущая версия) :
ip_equipment='9e276580d749:192.168.0.4'
read -d "\n" mac_equipment ip_equipment <<< "$(\
for P in $(seq 1 1 2); do
eval cmd='"s,(^.+):(.+$),\\$P,p"'
sed -nr $cmd <<< "$ip_equipment"
done)"
echo $mac_equipment $ip_equipment
Исходная версия Rot1, :
ip_equipment='9e276580d749:192.168.0.4'
read -d "\n" mac_equipment ip_equipment <<< "$(\
for P in $(seq 1 1 2); do
eval cmd='"s,(^.+):(.+$),\\$P,p"'
sed -nr $cmd <<< "$ip_equipment"
done)"
echo $mac_equipment $ip_equipment