Wednesday, November 19, 2025

Tip of the Day - Oracle & PostgreSQL (Sat, Jan 03 2026)

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.
 ----------------------------------------------------------------------------------------------------------

** Email to info@shreyantech.com to get such Tip of the Day in your email

No comments:

Post a Comment