Text searching in linux with grep

Anything technology related that does not fit in other categories
Locked
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Text searching in linux with grep

Post by Red Squirrel »

Grep is a linux command that is often overlooked but can be very useful when searching for stuff from a single string to a complicated regular expression. This article scratches the surface on it's power and should leave you with enough information to discover new uses for it.

http://www.iceteks.com/articles.php/grep/1



Archived topic from Iceteks, old topic ID:3111, old post ID:25418
Honk if you love Jesus, text if you want to meet Him!
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Text searching in linux with grep

Post by Red Squirrel »

These tests are done on RH8.0 which is considered somehwhat old so it could be possible that things got changed.

And the reason for the -l was to have 1 file per line, since the other is multiple files per line which achieves undesirable results in these examples. Though the results would of been the same if I would of put the words in a file line per line, but just wanted to show examples using real-time situations.

Archived topic from Iceteks, old topic ID:3111, old post ID:25468
Honk if you love Jesus, text if you want to meet Him!
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

Text searching in linux with grep

Post by Red Squirrel »

I think grep is only a linux thing, but there is a windows program that does the same but I forget what it's called.

Archived topic from Iceteks, old topic ID:3111, old post ID:26553
Honk if you love Jesus, text if you want to meet Him!
Shinizo
Posts: 2263
Joined: Thu Jun 16, 2005 10:18 pm

Text searching in linux with grep

Post by Shinizo »

Do you want an apple pie with that?

Archived topic from Iceteks, old topic ID:3111, old post ID:27710
I have no GREAT FRIENDS or MEMORIES
Locked