[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: awk or sed?



On Tue, 7 Apr 1998, Fabien Ninoles wrote:

> This will also delete every line that just match partially such as alpha2 or
> hello-alpha. The correction will be to edited the pattern-file a little through
> sed before submit it to grep:

Ok, no big deal. You can use the x option with grep that says only match
lines in the target that exactly match the pattern as a whole line. THis
would only match whole lines in the target that are exactly like the
whole lines in the pattern. You could also give w which says match only if
the pattern matches the target as a whole word.

OR

you can use the E option and use a regular expression.

No need to use sed or awk at all for this.


George Bonser 
Just be thankful that Open Group does not own Linux.
http://www.debian.org
Debian/GNU Linux ... the maintainable operating system.


--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: