"Sed" Question

View: New views
6 Messages — Rating Filter:   Alert me  

"Sed" Question

by henter2009 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have the following question about sed and methacaracters:

In the eg number 1, I escaped the +, to get any matches with 1 plus (1 or more characters)
In the eg number 2, I escaped the *, to get any matches with 0 or more characters, but it scape the * and takes it at literal.

Why it doesn't take + literal as well?
How does it really works?
Any help?




1.) sed -ne '/t\+/Ip'

tango
tango   > repeated
balada  > non repeated


2.) sed -ne '/t\*/Ip'

t8
t*
t*
                                  _
ASCII ribbon campaign   ( )
 against HTML e-mail      X
                                 / \

Re: "Sed" Question

by Pierre Gaston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Oct 14, 2009 at 3:27 PM, henter2009
<jeronimocalvop@...>wrote:

>
> I have the following question about sed and methacaracters:
>
> This mailing list is mainly about the development, the features and the
bugs of bash.

sed is not really related to the shell, except that you often use it in bash
and in scripts.

Please consider asking in a sed mailing list like:

http://sed.sourceforge.net/#mailing

or maybe in the usenet group comp.unix.shell

Re: "Sed" Question

by Bob Proulx :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Pierre Gaston wrote:
> Please consider asking in a sed mailing list like:
> http://sed.sourceforge.net/#mailing
> or maybe in the usenet group comp.unix.shell

I would think help-gnu-utils@... would be the better place to ask
for help about GNU utilities.  :-)

Bob



Re: "Sed" Question

by Greg Wooledge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Oct 14, 2009 at 12:24:30PM -0600, Bob Proulx wrote:
> Pierre Gaston wrote:
> > Please consider asking in a sed mailing list like:
> > http://sed.sourceforge.net/#mailing
> > or maybe in the usenet group comp.unix.shell
>
> I would think help-gnu-utils@... would be the better place to ask
> for help about GNU utilities.  :-)

We don't know that he's using GNU sed.



Re: "Sed" Question

by Bob Proulx :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greg Wooledge wrote:
> Bob Proulx wrote:
> > I would think help-gnu-utils@... would be the better place to ask
> > for help about GNU utilities.  :-)
>
> We don't know that he's using GNU sed.

True, we don't know for sure.  But I think it likely that it is GNU
sed given the behavior.  Plus either way then we can keep gently
helping GNU and encouraging Free Software.

Bob



Parent Message unknown Re: "Sed" Question

by Allodoxaphobia :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 14 Oct 2009 15:05:09 -0400, Greg Wooledge wrote:

> On Wed, Oct 14, 2009 at 12:24:30PM -0600, Bob Proulx wrote:
>> Pierre Gaston wrote:
>> > Please consider asking in a sed mailing list like:
>> > http://sed.sourceforge.net/#mailing
>> > or maybe in the usenet group comp.unix.shell
>>
>> I would think help-gnu-utils@... would be the better place to ask
>> for help about GNU utilities.  :-)
>
> We don't know that he's using GNU sed.

But, we do know it ain't a bash bug.