
Courtesy of Pete in work. To enable hostname auto completion in Bash, do the following: dig pop @dns.server.tld axfr | awk ‘$4 ~ /\yA\y/ && gsub(/.$/,””,$1) {print $1}’ > ~/.hosts If you would prefer to filter out hosts e.g. dev and swi, change awk to: awk ‘$4 ~ /\yA\y/ && ! /dev/ && ! /swi/… Read more »