How to grep for a string in a file
Hello,
I have an xml file which has many lines like this : Code:
myFileCode="null#9" I tried the following with no result : Code:
grep "MyFileCode="null#9"" myfile.xml Thanks in advance. |
You'll need to escape the double quotes with a backslash. This should work:
Code:
grep "myFileCode=\"null#9\"" myfile.xml |
Use a lower case m in the beginning to match the row in your file, and use backslashes to escape the ":s in the row.
Code:
grep "myFileCode=\"null#9\"" myfile.xml |
arungoodboy
Thanks so much. It worked great. |
All times are GMT -5. The time now is 06:30 AM. |