Skip to content

Commit

Permalink
Grep Tutorial Snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
CoreyMSchafer committed Mar 7, 2018
1 parent 39d50f3 commit c325490
Show file tree
Hide file tree
Showing 5 changed files with 561 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Terminal/Grep/Personel/emails.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

Corey Schafer
[email protected]

John Williams
[email protected]

Jane Doe
[email protected]
9 changes: 9 additions & 0 deletions Terminal/Grep/Personel/phone_numbers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

Corey Schafer
304-555-0223

John Williams
321-555-1234

Jane Doe
123-555-4321
24 changes: 24 additions & 0 deletions Terminal/Grep/grep-commands.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
grep "Jane Williams" names.txt
grep "John Williams" names.txt

grep -w "John Williams" names.txt
grep -wi "John Williams" names.txt
grep -win "John Williams" names.txt

grep -win -B 4 "John Williams" names.txt
grep -win -A 4 "John Williams" names.txt
grep -win -C 2 "John Williams" names.txt

grep -win "John Williams" ./*
grep -win "John Williams" ./*.txt
grep -winr "John Williams" .
grep -wirl "John Williams" .
grep -wirc "John Williams" .

history
history | grep "git commit"
history | grep "git commit" | grep "dotfile"

grep "...-...-...." names.txt
grep -P "\d{3}-\d{3}-\d{4}" names.txt
grep -V
9 changes: 9 additions & 0 deletions Terminal/Grep/memo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

Dear Mr. Doe,

In our meeting today, John Williams had mentioned that the work could be completed by the end of the month.

We really appreciate the hard work!

Thanks,
Corey Schafer
Loading

0 comments on commit c325490

Please sign in to comment.