Re: Need help with awk one-liner

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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@xxxxxxxxxx
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

--
Denis Becker
Information Technology - Engineering
MN State Univ., Mankato
Mankato, MN
ph: 507-389-5617
fx: 507-389-5002

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux