Delete comment from: Javarevisited
Can you please suggest grep command examples for following scenario:
How to grep for String with spaces something like
grep ' ABC' file
I think this will work because quotes will include the spaces as well while searching.
How to grep for String with double quotes inside like
grep '"ABC"' file
this will also work because single quote treats double quotes as literal, please check if it doesn't work and why.
How to grep for String with single quotes in it?
for example if I want to search for word don't which has single quote on it, will following grep command work :
grep "don't" file
How to escape characters while using grep command in Unix ?
Aug 14, 2012, 4:50:02 AM