![]() Without -v, it would output only the lines in which grep does appear. In case any issues on the commands which is explained in the article, you can post your comment in the comment section below.Grep -v "grep" takes input line by line, and outputs only the lines in which grep does not appear. Suggested Read: What’s Difference Between Grep, Egrep and Fgrep in Linux? It is worth to be familiar with other options and syntax to save the time. Grep is also an important tool for shell scripting and programmers to search the pattern in the programs. I have explained the advanced functionality of grep which is very strong and powerful tool to search the pattern in a File. The grep searches a line which will start from i.e Hexadecimal Digits. Grep – Search Uppercase Letters in File 11. Search Uppercase LettersĪnother option in the grep is also used to search a line which will start from i.e Upper-case Letters. Grep – Search Space Characters in File 10. The grep has also a functionality to search a line which will start from i.e. Grep – Search Printable Characters in File 9. Similarly like Graphical Characters, grep is useful to search a line which will start from Alphanumeric, Punctuation and space characters. Grep – Search Graphical Characters in File 8. The grep is also used to search a line which will start from Alphanumeric & Punctuation Characters called as Graphical Characters. Grep – Search Punctuation Characters in File 7. The Punctuation characters for grep is to search line which will start from ^ _ ` ~. Grep – Search Lower Letters or Words in File 6. Search Lower LettersĪnother option for grep is to search line which will start from lower letters i.e ( Lower Letters). Grep – Search Number Characters in File 5. The digit option for grep is also very useful to search line which will start from digit i.e. Grep – Search for Spaces or Tabs in File 4. Search Blank CharactersĪnother options like if you want to search line which will start from i.e. Grep – Search Alpha Characters in File 3. Similar options like if you want to search line which will start from only i.e. Grep – Search Alphanumeric Characters in File 2. If you have thousands of lines in a file and wanted to search a line which will start from only A-Z, a-z & 0-9 ( Alphanumeric Characters). ![]() Here I have considered tecmint.txt is the base file where we will search pattern with the help of grep command in this article for explanation. ![]() In this article I will be going to explain advanced commands on grep for the Character Classes in Linux and Unix like operating system. Suggested Read: 12 Basic Practical Examples of Linux grep Command If you will divide the word grep like g/re/p then the meaning of grep is (globally search a regular expression and print) which search pattern from the file and print the line on the screen i.e. Grep is a command line utility for searching plain-text data for lines which matching a regular expression. Have you ever been into a situation where you need to search for a string, word or pattern inside a file? if yes, then the grep utility comes handy in such situation. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |