<br><br><div class="gmail_quote">On Jan 18, 2008 12:20 PM, ann kok <<a href="mailto:annkok2001@yahoo.com">annkok2001@yahoo.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all<br><br>how can use grep or use other command to get exactly<br>pattern eg: <a href="http://10.0.0.7" target="_blank">10.0.0.7</a> only?<br><br>eg: grep <a href="http://10.0.0.7" target="_blank">10.0.0.7</a> file. I want to get 
<a href="http://10.0.0.7" target="_blank">10.0.0.7</a> only<br>not<br><br><a href="http://10.0.0.71" target="_blank">10.0.0.71</a><br><a href="http://10.0.0.72" target="_blank">10.0.0.72</a><br><a href="http://10.0.0.7" target="_blank">
10.0.0.7</a><br><br>thank you<br><br><br>      ____________________________________________________________________________________<br>Never miss a thing.  Make Yahoo your home page.<br><a href="http://www.yahoo.com/r/hs" target="_blank">
http://www.yahoo.com/r/hs</a><br><font color="#888888"><br>--<br>fedora-list mailing list<br><a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a><br>To unsubscribe: <a href="https://www.redhat.com/mailman/listinfo/fedora-list" target="_blank">
https://www.redhat.com/mailman/listinfo/fedora-list</a></font></blockquote><div><br>If there is something else in the line in addition to <a href="http://10.0.0.7">10.0.0.7</a> <br>example: <a href="http://10.0.0.7">10.0.0.7
</a> word1 word2 number1...<br>then use<br>   > grep -w <a href="http://10.0.0.7">10.0.0.7</a> myfile | awk '{print $1}'<br><br> if <a href="http://10.0.0.7">10.0.0.7</a> is the second field then use '{print $2}' and so on.
<br>~af<br></div></div><br>