#! /bin/bash
sd '^.*incus.*$' '' /etc/hosts
sd '\n\n' '\n' /etc/hosts
sd '\n\n' '\n' /etc/hosts
incus ls --all-projects -f compact -c 4n|grep eth0| sd '  ' '' | sd '\([^)]*\)\s*' '\tincus.' >> /etc/hosts
incus ls --all-projects -f compact -c 6n|grep eth0| sd '  ' '' | sd '\([^)]*\)\s*' '\tincus6.' >> /etc/hosts
echo "-----------------------------------------------------------"
cat /etc/hosts
echo "-----------------------------------------------------------"
