[CentOS] Need help with awk one-liner
Denis
denis.becker at mnsu.eduThu Jul 10 18:06:09 UTC 2008
- Previous message: [CentOS] Need help with awk one-liner
- Next message: [CentOS] Evolution in CentOS 5.2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 at 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 -- Denis Becker Information Technology - Engineering MN State Univ., Mankato Mankato, MN ph: 507-389-5617 fx: 507-389-5002
- Previous message: [CentOS] Need help with awk one-liner
- Next message: [CentOS] Evolution in CentOS 5.2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list