grep Regular expressions Regular expressions

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

The search pattern can also be a regular expression. Running:

grep '^[A-Z]' someFile.txt

When someFile.txt contains:

fred 14 m foo
sam 68 m bar
christina 83 f baz
bob 22 m qux
Sam 41 m quux

Will produce the output:

Sam 41 m quux

since this is the only line in someFile.txt starting with an upper case letter.



Got any grep Question?