Sean Carolan wrote:
The awk output that was piped into to the sed command looks like this:
ajpv12://host1.domain.company.com:8008/root ajpv12://host2.domain.company.com:8008/root ajpv12://host3.domain.company.com:8008/root _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
for the sample data you gave the following worked for me:
gawk -F/ '/:8008/root/ {split($3,hostname,".") ; print hostname[1]}' urls