![]() ![]() (dot): Matches any one character $ grep ".vik" file.txt (e) Use $: The pattern preceding it must occur at the end of each line $ grep "vedik$" file.txt Search lines beginning with an non-alphabetic character It specifies the pattern containing the word “New” followed by any character other than an ‘a’,’b’, or ‘c’ (d) Use ^ with : The pattern must not contain any character in the set specified It specifies the search pattern as sanjeev ,sanjay, sanrit, sanchit, sandeep etc. (c ) Use ^: The pattern following it must occur at the beginning of each line ![]() It specifies the search pattern as: New followed by a number and then an alphabet. It specifies the search pattern as Newa, Newb or Newc, Newd, Newe (b) Use with hyphen: Matches any one of a range characters It specifies the search pattern as Agarwal, Agaawal, Agrawal, Agrrwal It specifies the search pattern as : Newa, Newb or Newc (a) : Matches any one of a set characters (dot).*: Nothing or any numbers of characters.*: zero or more occurrences of the previous character.\ (backslash): Ignores the special meaning of the character following it.$: The pattern preceding it must occur at the end of each line.^ with : The pattern must not contain any character in the set specified.^: The pattern following it must occur at the beginning of each line.with hyphen: Matches any one of a range characters.Like the shell’s wild–cards which match similar filenames with a single expression, grep uses an expression of a different sort to match a group of similar patterns. A “string of text” can be further defined as a single character, word, sentence or particular pattern of characters. Regular Expression provides an ability to match a “string of text” in a very flexible and concise manner. Array Basics in Shell Scripting | Set 1. ![]() How to Hack WPA/WPA2 WiFi Using Kali Linux?.Mutex lock for Linux Thread Synchronization.SORT command in Linux/Unix with examples.AWK command in Unix/Linux with examples.Sed Command in Linux/Unix with examples.ISRO CS Syllabus for Scientist/Engineer Exam.ISRO CS Original Papers and Official Keys.GATE CS Original Papers and Official Keys. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |