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       10.20.1.70

fpe-ap-v1                       IN      A       10.20.1.71

fpe-ap-v2                       IN      A       10.20.1.72

fpe-ap-v3                       IN      A       10.20.1.73

fpe-ap-v4                       IN      A       10.20.1.74

fpe-ap-v5                       IN      A       10.20.1.75

fpe-ap-v6                       IN      A       10.20.1.76

fpe-ap-v7                       IN      A       10.20.1.77

fpe-ap-v8                       IN      A       10.20.1.78

fpe-ap-v9                       IN      A       10.20.1.79

mis-fpe1                        IN      A       10.20.3.37

mis-fpe2                        IN      A       10.20.3.38

[root@vmgenie-ns private]#

 
 

Advertisement

Featured Links:
HREmail.com
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