grep command with '^' option
$ grep "^20-NOV-2025" listener.log
The above command will search for the text string '20-NOV-2025' ONLY at the beginning of each line of the file and print the lines which has the matching string at the beginning of the line.
The caret symbol (^) with grep is a regular expression metacharacter that matches the start of a line.
It is used as part of the search PATTERN, not as a command-line OPTION.
It is used as part of the search PATTERN, not as a command-line OPTION.
Youtube Shorts : https://youtube.com/shorts/eN6QeFoqvWg?feature=share
----------------------------------------------------------------------------------------------------------
** Connect with the author / trainer: https://suchitdba.blogspot.com/p/connect-with-author-database-trainer.html
** Email to info@shreyantech.com to get such Tip of the Day in your email
No comments:
Post a Comment