Profile
Set info
sudo tee -a /etc/profile <<EOF
GW=$(route -n | grep '^0.0.0.0' | awk '{print $2}')
GWIF=$(route -n | grep '^0.0.0.0' | awk '{print $NF}')
MAC=$(ip a show "${GWIF}" | grep -oP 'ether \K.*(?= brd)')
hname=$(hostname)
IP=$(ip a show "${GWIF}" | grep -oP 'inet \K.*(?=/)')
EOFLast updated