$ grep -iw "is" demo_fileĪnd this is the last line. Please note that this output does not contain the line “This Line Has All Its First Character Of The Word With Upper Case”, even though “is” is there in the “This”, as the following is looking only for the word “is” and not for “this”. The following example is the WORD grep where it is searching only for the word “is”. When you search for “is”, without any option it will show out “is”, “his”, “this” and everything which has the substring “is”. The following example is the regular grep where it is searching for “is”. Just doing out a normal search will show out all the lines. If you want to search for a word, and to avoid it to match the substrings use -w option. Checking for full words, not for sub-strings using grep -w
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |