[nylug-talk] need sed help

Eric Moore eemoore at fyndo.com
Tue Apr 3 13:19:20 EDT 2007


"Peter C. Norton" <spacey-nylug at lenin.net> writes:

> On Tue, Apr 03, 2007 at 12:45:24PM -0400, Eric Moore wrote:
>> "Peter C. Norton" <spacey-nylug at lenin.net> writes:
>> 
>> > The * is one or more ofr the preceeding character or group.
>> 
>> zero or more.
>
> Whoops, that's right. And I always get confused as to why that's
> needed, and not a + in these cases.
> Any enlightenment here?

the + works fine too.  usually it needs to be backslashed though

sed -e '1s/^[ \t]\+//'

and the * works in glob expressions, so people tend to use the star
when either works.

-- 
Eric


More information about the nylug-talk mailing list