#!/bin/bash # /usr/local/bin/myfqdn # https://crystalfaeries.net/posix/bin/myfqdn # celeste:crystalfaery MYFQDN 2016-10-18 08:13:18+00:00 # My Fully Qualified Domain Name is: echo "$(ip addr sh eth0 | grep 'inet ' | awk '{print $2}' | cut -d'/' -f 1) $(hostname -f)"