Re: Sed and GNU-like

2010-01-27 Thread Stuart Henderson
On 2010-01-27, ropers wrote: > Or maybe FreeBSD uses GNU sed -- I haven't checked.) nope, that's GNU sort that they use (ya rly). they use BSD sed.

Re: Sed and GNU-like

2010-01-26 Thread ropers
2010/1/26 jul : > I want to add a small extra difference which annoys me between bsd and > GNU sed > > $ echo Foo | sed 's/foo/fuu/i' > sed: 1: "s/foo/fuu/i": bad flag in substitute command: 'i' > > it seems bsd sed has no support for case-insenstive flag. right ? I feel your pain. The I (or i) a

Re: Sed and GNU-like

2010-01-26 Thread jul
I want to add a small extra difference which annoys me between bsd and GNU sed $ echo Foo | sed 's/foo/fuu/i' sed: 1: "s/foo/fuu/i": bad flag in substitute command: 'i' it seems bsd sed has no support for case-insenstive flag. right ? Best regards, Jul

Re: Sed and GNU-like

2010-01-22 Thread Hugo Villeneuve
On Sat, Jan 23, 2010 at 02:22:36AM +0100, Ingo Schwarze wrote: > Hi Marcello, > > Marcello Cruz wrote on Fri, Jan 22, 2010 at 10:31:18PM -0200: > > > I've read the documentation about sed - sed(8), re_format(7) and > > /usr/share/doc/usd/15.sed/ - but I still don't realize how to make > > this co

Re: Sed and GNU-like (SOLVED)

2010-01-22 Thread Marcello Cruz
- Original Message - From: "Abel Abraham Camarillo Ojeda" "Marcello Cruz" wrote: $ s/(^[A_Z]{1})([a-z]+)\.sgml/\1\2\.html/g You didn't read re_format(7) well: Basic regular expressions differ in several respects: o `|', `+', and `?' are ordinary characters and the

Re: Sed and GNU-like (SOLVED)

2010-01-22 Thread Marcello Cruz
You didn't read re_format(7) well: Basic regular expressions differ in several respects: o `|', `+', and `?' are ordinary characters and there is no equiva- lent for their functionality. o The delimiters for bounds are `\{' and `\}', with `{' and `}' by

Re: Sed and GNU-like

2010-01-22 Thread Marcello Cruz
As I read I must prefix the '{', '}', '(' and ')' with backslashes. Even if I do so, the command does not work. The command should take a filename starting with a capital letter followed with the extension 'sgml' and translate the extension to 'html'. 1. Always show the commands you're actuall

Re: Sed and GNU-like

2010-01-22 Thread Abel Abraham Camarillo Ojeda
"Marcello Cruz" wrote: > Dear friends, > > I've read the documentation about sed - sed(8), re_format(7) and > /usr/share/doc/usd/15.sed/ - but I still don't realize how to make this > command work: > > $ s/(^[A_Z]{1})([a-z]+)\.sgml/\1\2\.html/g > > As I read I must prefix the '{', '}', '(' and

Re: Sed and GNU-like

2010-01-22 Thread Chris Bennett
Ted Unangst wrote: On Fri, Jan 22, 2010 at 7:31 PM, Marcello Cruz wrote: $ s/(^[A_Z]{1})([a-z]+)\.sgml/\1\2\.html/g As I read I must prefix the '{', '}', '(' and ')' with backslashes. Even if I do so, the command does not work. The command should take a filename starting with a capital lett

Re: Sed and GNU-like

2010-01-22 Thread Ingo Schwarze
Hi Marcello, Marcello Cruz wrote on Fri, Jan 22, 2010 at 10:31:18PM -0200: > I've read the documentation about sed - sed(8), re_format(7) and > /usr/share/doc/usd/15.sed/ - but I still don't realize how to make > this command work: First decide whether you want to use basic or extended regular e

Re: Sed and GNU-like

2010-01-22 Thread Ted Unangst
On Fri, Jan 22, 2010 at 7:31 PM, Marcello Cruz wrote: > $ s/(^[A_Z]{1})([a-z]+)\.sgml/\1\2\.html/g > > As I read I must prefix the '{', '}', '(' and ')' with backslashes. Even if > I do so, the command does not work. The command should take a filename > starting with a capital letter followed with

Sed and GNU-like

2010-01-22 Thread Marcello Cruz
Dear friends, I've read the documentation about sed - sed(8), re_format(7) and /usr/share/doc/usd/15.sed/ - but I still don't realize how to make this command work: $ s/(^[A_Z]{1})([a-z]+)\.sgml/\1\2\.html/g As I read I must prefix the '{', '}', '(' and ')' with backslashes. Even if I do so