Home Linux How to search for a string inside a file?
How to search for a string inside a file? PDF Print E-mail
Written by Siva   
Monday, 22 November 2010 18:26

you can use grep.. here sample shows searching for string "fpe" inside "db.vmgenie.net" file:


[root@vmgenie-ns private]# cat db.vmgenie.net | grep fpe

fpe-ap-v0                       IN      A

fpe-ap-v1                       IN      A

fpe-ap-v2                       IN      A

fpe-ap-v3                       IN      A

fpe-ap-v4                       IN      A

fpe-ap-v5                       IN      A

fpe-ap-v6                       IN      A

fpe-ap-v7                       IN      A

fpe-ap-v8                       IN      A

fpe-ap-v9                       IN      A

mis-fpe1                        IN      A

mis-fpe2                        IN      A

[root@vmgenie-ns private]#



Featured Links:
Looking for job? Try HREmail.com
Want to have CMS based Websites?
Try siliconwebcreators.com to CMS based websites.
VM Solutions Inc
For best VM solutions..
Digital Procedure Inc.
Looking for Oracle /SAP /Weblogic Consulting services? visit digitalprocedure.com