Wrox Programmer Forums
|
Linux General discussion of programming the various flavors of Linux operating systems.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Linux section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 25th, 2006, 08:03 AM
Authorized User
 
Join Date: Feb 2006
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default egrep problem

I am trying to learn egrep. I have created the following file. There tab between the names and extension.

Maryann Clark 101
Sally Smith 113
Jane Bailey 121
Jack Austen 120
Steve Daniels 111
Sylvia Dawson 110
Henry Morgan 112
Hank Parker 114
Charlie Smith 122
Bill Williams 100

I want to use egrep to output

Bill Williams 100
Maryann Clark 101

Which are the names with numbers between(including) 100-109

I tried
egrep 10 people
But get the following

Maryann Clark 101
Sylvia Dawson 110
Bill Williams 100

How can I add the tab to the egrep ie egrep tab10 people. Or how can I solve my problem.

Is there a good tutorial that someone can send me too for reg-expr use in grep

Thanks

Brendon

 
Old October 25th, 2006, 11:48 AM
Friend of Wrox
 
Join Date: Dec 2003
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Code:
egrep "\t10" myfile
--
Don't Stand on your head - you'll get footprints in your hair
                                           http://charlieharvey.org.uk
                                              http://charlieharvey.com









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.