[buug] RE: Buug digest, Vol 1 #547 - 4 msgs

Clarke, John John.Clarke at LibertyMutual.com
Fri Sep 19 08:13:39 PDT 2003


Thanks for getting back to me Sean.  Sorry for my possible ignorance but
is GNU is Linux's flavor ,correct?  Unfortunately, I have Solaris and
AIX.   

Cheers,
John
-----Original Message-----
From: buug-request at weak.org [mailto:buug-request at weak.org] 
Sent: Friday, September 19, 2003 9:38 AM
To: buug at weak.org
Subject: Buug digest, Vol 1 #547 - 4 msgs


Send Buug mailing list submissions to
	buug at weak.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://www.weak.org/mailman/listinfo/buug
or, via email, send a message with subject or body 'help' to
	buug-request at weak.org

You can reach the person managing the list at
	buug-admin at weak.org

When replying, please edit your Subject line so it is more specific than
"Re: Contents of Buug digest..."


Today's Topics:

   1. To dump core for sure (Masahide Tomita)
   2. Grep command (Clarke, John)
   3. Re: Grep command (Sean Neakums)
   4. Re: Grep command (Pong-TC)

--__--__--

Message: 1
Date: Fri, 19 Sep 2003 15:13:43 +0900
From: Masahide Tomita <m-tomita at uf.cnt.neec.jp.nec.com>
To: buug at weak.org
Subject: [buug] To dump core for sure

Hi, 


I'm new in this list but I'm almost desperate, so let me ask a 
question.

I'm developping multi-threaded application on RedHat Linux 7.2. 
The application still contains some bugs and sometimes abort by 
SIGSEGV, but it doesn't dump core everytime.
Funny thing is that it sometime does.

It seems like dumping might be controlled by something 
environmental, not by application.

So, what I want to know is:

 1. Is there some way to force applications to dump core? 
    (Like, calling some function in the source? if any...)

 2. What would be the case that application don't dump ocre 
    even if it's SIGSEGV?

I checked taht limit is set to "unlimited".


Please tell me if someone knows the answer.
Thank you for your help, in advance.


Regards,

Masahide Tomita


-- 
Masahide Tomita <m-tomita at uf.cnt.neec.jp.nec.com>


--__--__--

Message: 2
Date: Fri, 19 Sep 2003 08:37:11 -0400
From: "Clarke, John" <John.Clarke at LibertyMutual.com>
To: <buug at weak.org>
Subject: [buug] Grep command

This is a multi-part message in MIME format.

------_=_NextPart_001_01C37EAA.BF393A31
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Ha all,
I want to grab data from either side of a matched criteria from grep.
Any one got any other ideas of a command and if it does work please tell
me what OS and version and what shell.  Also if anyone does do this how
do you just get lines below or lines above the match rather than both.

This is what I am trying to do

Inputfile
A
B
C
D
E
F
G

Grep  -2 'D' inputfile
Expected result
=20
B
C
D
E
F

Cheers,
John

DB2 - UDB DBA
RAM - Liberty Mutual
Ph(317) 581 8673
------------------------------------------------------------------------
-------------------------------------
CONFIDENTIALITY NOTICE: If you have received this e-mail in error,
please immediately notify the sender by e-mail at the address shown.
This e-mail transmission may contain confidential information. This
information is intended only for the use of the individual(s) or entity
to whom it is intended even if addressed incorrectly. Please delete it
from your files if you are not the intended recipient. Thank you for
your compliance. Copyright (c) 2003 Liberty Mutual
------------------------------------------------------------------------
-------------------------------------




------_=_NextPart_001_01C37EAA.BF393A31
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange
Server version = 6.0.6396.0"> <TITLE>Grep command</TITLE> </HEAD> <BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=3D2 FACE=3D"Arial">Ha all,</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">I want to grab data from either side =
of a matched criteria from grep.  Any one got any other ideas of a
= command and if it does work please tell me what OS and version and
what = shell.  Also if anyone does do this how do you just get
lines below = or lines above the match rather than both.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">This is what I am trying to do</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Inputfile</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">A</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">B</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">C</FONT>

<BR><B><FONT SIZE=3D2 FACE=3D"Arial">D</FONT></B>

<BR><FONT SIZE=3D2 FACE=3D"Arial">E</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">F</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">G</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Grep  -2 'D' inputfile</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Expected result</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial"> </FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">B</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">C</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">D</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">E</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">F</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Cheers,</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">John</FONT>
</P>

<P><B><FONT COLOR=3D"#800000" SIZE=3D2 FACE=3D"Arial">DB2 - UDB =
DBA</FONT></B>

<BR><B><I><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">RAM - Liberty
= Mutual</FONT></I></B><I></I>

<BR><B><I><FONT SIZE=3D2 FACE=3D"Arial">Ph(317) 581 =
8673</FONT></I></B><I></I>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">---------------------------------------------------------
-=
---------------------------------------------------</FONT>

<BR><FONT SIZE=3D1 FACE=3D"Arial">CONFIDENTIALITY NOTICE: If you have =
received this e-mail in error, please immediately notify the sender by =
e-mail at the address shown. This e-mail transmission may contain =
confidential information. This information is intended only for the use
= of the individual(s) or entity to whom it is intended even if
addressed = incorrectly. Please delete it from your files if you are not
the = intended recipient. Thank you for your compliance. Copyright (c)
2003 = Liberty Mutual</FONT></P>

<P><FONT SIZE=3D2 =
FACE=3D"Tahoma">--------------------------------------------------------
-=
----------------------------------------------------</FONT>
</P>
<BR>
<BR>

</BODY>
</HTML>
------_=_NextPart_001_01C37EAA.BF393A31--

--__--__--

Message: 3
To: buug at weak.org
Subject: Re: [buug] Grep command
From: Sean Neakums <sneakums at zork.net>
Date: Fri, 19 Sep 2003 13:53:16 +0100

"Clarke, John" <John.Clarke at LibertyMutual.com> writes:

> I want to grab data from either side of a matched criteria from grep. 
> Any one got any other ideas of a command and if it does work please 
> tell me what OS and version and what shell.  Also if anyone does do 
> this how do you just get lines below or lines above the match rather 
> than both.

GNU grep has some options that seem do what you want:

$ grep --help
[...]
Context control:
  -B, --before-context=NUM  print NUM lines of leading context
  -A, --after-context=NUM   print NUM lines of trailing context
  -C, --context=NUM         print NUM lines of output context
  -NUM                      same as --context=NUM
[...]
$ grep -2 D testfile
B
C
D
E
F
--
B
C
D
E
F
$ grep --version
grep (GNU grep) 2.5.1
[...]



--__--__--

Message: 4
Date: Fri, 19 Sep 2003 07:20:23 -0700
Subject: Re: [buug] Grep command
To: "Clarke, John" <John.Clarke at libertymutual.com>, buug at weak.org
From: "Pong-TC" <pong at taft.org>

"Clarke, John" <John.Clarke at libertymutual.com> writes:
>Ha all,
>I want to grab data from either side of a matched criteria from grep. 
>Any one got any other ideas of a command and if it does work please
tell
>me what OS and version and what shell.  Also if anyone does do this how
>do you just get lines below or lines above the match rather than both.
>
>This is what I am trying to do

I am not good, but I think you can do this.  YOu can do it with grep. 
grep D -v, this will give you the another result set.   YOu can try this


ls -la | grep d -v

You will get the list of file, except the directories.

Pong



--__--__--

_______________________________________________
Buug mailing list
Buug at weak.org
http://www.weak.org/mailman/listinfo/buug


End of Buug Digest




More information about the buug mailing list