The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 05-27-2009
durden_tyler's Avatar
durden_tyler durden_tyler is offline Forum Advisor  
Registered User
  
 

Join Date: Apr 2009
Posts: 532
Quote:
Originally Posted by rakesh_pagadala View Post
...
I have a requirement as below I want to grep xyz and get the result domain name as "unix.com"

3.209.12.09 xyz xyz.unix.com
Something like this:

Code:
$
$ cat input.txt
3.209.12.09 xyz xyz.unix.com
$
$ awk '{sub("xyz.","",$3); print $3}' input.txt
unix.com
$
tyler_durden