bug-grep
[Top][All Lists]
Advanced

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

Re: Simple Grep Command?


From: Dave B
Subject: Re: Simple Grep Command?
Date: Thu, 17 Sep 2009 17:23:39 +0100
User-agent: KMail/1.11.2 (Linux/2.6.28-15-generic; KDE/4.2.2; x86_64; ; )

On Thursday 17 September 2009 17:00:37 Newbie407 wrote:

> Two items. First, when I say "variable text" I just mean that there can be
> text of any length between the "LEC" and the carriage return.

Ok, but you don't say how, for example, the following should be considered:

aaa LEC foo bar baz ulty abc def LEC yyy xxx ulty

is that two instances of your pattern, or a single one, or it can never 
happen?

> But I'm confused when you say that Grep can't do replacements.  I'm using
> this in the context of TextWrangler, and it's all about finding and
> replacing text.  Maybe my newness is standing out here. . . .

I don't know what textwrangler is, but grep itself is a tool that only does 
pattern matching, ie print lines matching a pattern. No text replacement is 
possible with grep alone.

-- 
D.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]