bug-gnu-utils
[Top][All Lists]
Advanced

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

extrange behavior in SED


From: Martin Ferrari - Decidir IT
Subject: extrange behavior in SED
Date: Tue, 15 May 2001 16:17:02 -0300

Hi!

My sed is segfaulting when I use one especific regexp...

I have the following test file:


$ cat cc
dsadsadsa.,ads dsasdadsa dsadsa dsadsasda # asdasdasd
# asdasd
   # asdasd

asdasdasdasdasd

dasdasd
adsdd#asdasd

Then I was trying to generate a regexp to clean the comments off the file and wipe out the leading spaces. Trying the latter I found this:

$ cat cc | sed 's/^ *\<//'
dsadsadsa.,ads dsasdadsa dsadsa dsadsasda # asdasdasd
# asdasd
   # asdasd
Violación de segmento

(NOTE: Violación de segmento == segfault)
Maybe it's a shooting offense this regexp, I'm not an expert, but, it is normal to segfault because of this?

I try a simpler approach and it works:

$ cat cc | sed 's/^ *//'
dsadsadsa.,ads dsasdadsa dsadsa dsadsasda # asdasdasd
# asdasd
# asdasd

asdasdasdasdasd

dasdasd
adsdd#asdasd


$ sed --version
GNU sed version 3.02
 
Copyright (C) 1998 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.

$ rpm -q glibc
glibc-2.2.2-4mdk



Martin Ferrari
Administrador UNIX
Decidir.com
________________________________________
mailto:address@hidden
Visítenos en http://www.decidir.com
Decidir.com International Ltd.

***************** Internet Email Confidentiality Footer *******************
Privileged/Confidential Information may be contained in this message.
If you are not the addressee indicated in this message (or responsible
for delivery of the message to such person), you may not copy or deliver
this message to anyone.
In such case, you should destroy this message and kindly notify the
sender by reply email. Please advise us immediately if you or your
employer does not consent to using Internet email for messages of this
kind. Opinions, conclusions and other information in this message that
do not relate to the official business of my firm shall be considered
neither given nor endorsed by it.

******************* Confidencialidad en Internet Email ********************
Este mensaje puede contener información confidencial. Si usted no es el
destinatario de este mail, o la persona encargada de recibir los
mensajes para dicha persona, por favor no copie ni reenvie este mansaje.
De ser así, por favor destruya este mensaje y de ser tan amable
notifique al remitente con un Email. En caso de no querer recibir esta
clase de información via Internet por favor avisenos cuanto antes.
Conclusiones, opiniones y cualquier otro tipo de información que
contenga este mensaje y que no este directamente relacionado con el
rubro oficial de esta Empresa, no debe ser tomado en cuenta.

*********************** Confidencialidade na Internet Email ***********************
Esta mensagem pode conter informação confidencial. Se você não é o destinatário deste mail, ou a pessoa encarregada de recebê-lo, por favor não copie nem reenvie esta mensagem. Sendo assim, por favor elimine esta mensagem e notifique ao remetente via e-mail. Se voçê não quiser receber este tipo de informação pela Internet, por favor nos avise quanto antes. Conclusões, opiniões e qualquer outro tipo de informação que contenha esta mensagem e que não esteja diretamente relacionada com o rubro oficial desta empresa, não devem ser tomados em conta.


reply via email to

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