Unix Technical Forum

Searching a number other than 0

This is a discussion on Searching a number other than 0 within the AIX Operating System forums, part of the Unix Operating Systems category; --> Hi, I have a doubt. I have a file which looks as folows. Import results for DBCHECK Number of ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 10:53 AM
chaitu
 
Posts: n/a
Default Searching a number other than 0

Hi,
I have a doubt. I have a file which looks as folows.

Import results for DBCHECK

Number of rows read = 1
Number of rows skipped = 0
Number of rows inserted = 1
Number of rows updated = 0
Number of rows rejected = 0
Number of rows committed = 1

SQL3526N The modifier clause "IDENTITYIGNORE" is inconsistent with the
current load command. Reason code: "3".
Import results for COLLECTION_METHOD

Number of rows read = 3
Number of rows skipped = 0
Number of rows inserted = 3
Number of rows updated = 0
Number of rows rejected = 0
Number of rows committed = 3

SQL3526N The modifier clause "IDENTITYIGNORE" is inconsistent with the
current load command. Reason code: "3".
Import results for INDIVIDUAL_PROVIDER

Number of rows read = 4050
Number of rows skipped = 0
Number of rows inserted = 4050
Number of rows updated = 0
Number of rows rejected = 0
Number of rows committed = 4050

SQL3526N The modifier clause "IDENTITYIGNORE" is inconsistent with the
current load command. Reason code: "3".
Import results for INDIVIDUAL_PROVIDER_AUDIT

Number of rows read = 937
Number of rows skipped = 0
Number of rows inserted = 0
Number of rows updated = 0
Number of rows rejected = 937
Number of rows committed = 937


Number of rows read = 937
Number of rows skipped = 0
Number of rows inserted = 937
Number of rows updated = 0
Number of rows rejected = 0
Number of rows committed = 937

Import results for VENDOR_CLAIMS_SUBMISSION_NPI

Number of rows read = 2435
Number of rows skipped = 0
Number of rows inserted = 2435
Number of rows updated = 0
Number of rows rejected = 0
Number of rows committed = 2435

SQL3526N The modifier clause "IDENTITYIGNORE" is inconsistent with the
current load command. Reason code: "3".
Import results for VENDOR_CLAIMS_SUB_NPI_AUDIT

Number of rows read = 45
Number of rows skipped = 0
Number of rows inserted = 0
Number of rows updated = 0
Number of rows rejected = 45
Number of rows committed = 45


Number of rows read = 45
Number of rows skipped = 0
Number of rows inserted = 45
Number of rows updated = 0
Number of rows rejected = 0
Number of rows committed = 45

Import results for VENDOR_PAYMENT_NPI

Number of rows read = 2342
Number of rows skipped = 0
Number of rows inserted = 2342
Number of rows updated = 0
Number of rows rejected = 0
Number of rows committed = 2342

SQL3526N The modifier clause "IDENTITYIGNORE" is inconsistent with the
current load command. Reason code: "3".
Import results for VENDOR_PAYMENT_NPI_AUDIT

Number of rows read = 130
Number of rows skipped = 0
Number of rows inserted = 0
Number of rows updated = 0
Number of rows rejected = 130
Number of rows committed = 130


Number of rows read = 130
Number of rows skipped = 0
Number of rows inserted = 130
Number of rows updated = 0
Number of rows rejected = 0
Number of rows committed = 130

Import results for VENDOR_PROVIDER

Number of rows read = 2299
Number of rows skipped = 0
Number of rows inserted = 2299
Number of rows updated = 0
Number of rows rejected = 0
Number of rows committed = 2299

SQL3526N The modifier clause "IDENTITYIGNORE" is inconsistent with the
current load command. Reason code: "3".
Import results for VENDOR_PROVIDER_AUDIT

Number of rows read = 1058
Number of rows skipped = 0
Number of rows inserted = 0
Number of rows updated = 0
Number of rows rejected = 1058
Number of rows committed = 1058


Number of rows read = 1058
Number of rows skipped = 0
Number of rows inserted = 1058
Number of rows updated = 0
Number of rows rejected = 0
Number of rows committed = 1058

Now, how do i search for Number of rows inserted = any other number
other than 0 using Grep or any other command. Plz help me with this.

Thanks in advance

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2008, 10:53 AM
Roy
 
Posts: n/a
Default Re: Searching a number other than 0

chaitu wrote:
> Hi,
> I have a doubt. I have a file which looks as folows.
>
> Import results for DBCHECK
>
> Number of rows read = 1
> Number of rows skipped = 0
> Number of rows inserted = 1
> Number of rows updated = 0
> Number of rows rejected = 0
> Number of rows committed = 1
>
> SQL3526N The modifier clause "IDENTITYIGNORE" is inconsistent with the
> current load command. Reason code: "3".
> Import results for COLLECTION_METHOD
>
> Number of rows read = 3
> Number of rows skipped = 0
> Number of rows inserted = 3
> Number of rows updated = 0
> Number of rows rejected = 0
> Number of rows committed = 3
>
> SQL3526N The modifier clause "IDENTITYIGNORE" is inconsistent with the
> current load command. Reason code: "3".
> Import results for INDIVIDUAL_PROVIDER
>
> Number of rows read = 4050
> Number of rows skipped = 0
> Number of rows inserted = 4050
> Number of rows updated = 0
> Number of rows rejected = 0
> Number of rows committed = 4050
>
> SQL3526N The modifier clause "IDENTITYIGNORE" is inconsistent with the
> current load command. Reason code: "3".
> Import results for INDIVIDUAL_PROVIDER_AUDIT
>
> Number of rows read = 937
> Number of rows skipped = 0
> Number of rows inserted = 0
> Number of rows updated = 0
> Number of rows rejected = 937
> Number of rows committed = 937
>
>
> Number of rows read = 937
> Number of rows skipped = 0
> Number of rows inserted = 937
> Number of rows updated = 0
> Number of rows rejected = 0
> Number of rows committed = 937
>
> Import results for VENDOR_CLAIMS_SUBMISSION_NPI
>
> Number of rows read = 2435
> Number of rows skipped = 0
> Number of rows inserted = 2435
> Number of rows updated = 0
> Number of rows rejected = 0
> Number of rows committed = 2435
>
> SQL3526N The modifier clause "IDENTITYIGNORE" is inconsistent with the
> current load command. Reason code: "3".
> Import results for VENDOR_CLAIMS_SUB_NPI_AUDIT
>
> Number of rows read = 45
> Number of rows skipped = 0
> Number of rows inserted = 0
> Number of rows updated = 0
> Number of rows rejected = 45
> Number of rows committed = 45
>
>
> Number of rows read = 45
> Number of rows skipped = 0
> Number of rows inserted = 45
> Number of rows updated = 0
> Number of rows rejected = 0
> Number of rows committed = 45
>
> Import results for VENDOR_PAYMENT_NPI
>
> Number of rows read = 2342
> Number of rows skipped = 0
> Number of rows inserted = 2342
> Number of rows updated = 0
> Number of rows rejected = 0
> Number of rows committed = 2342
>
> SQL3526N The modifier clause "IDENTITYIGNORE" is inconsistent with the
> current load command. Reason code: "3".
> Import results for VENDOR_PAYMENT_NPI_AUDIT
>
> Number of rows read = 130
> Number of rows skipped = 0
> Number of rows inserted = 0
> Number of rows updated = 0
> Number of rows rejected = 130
> Number of rows committed = 130
>
>
> Number of rows read = 130
> Number of rows skipped = 0
> Number of rows inserted = 130
> Number of rows updated = 0
> Number of rows rejected = 0
> Number of rows committed = 130
>
> Import results for VENDOR_PROVIDER
>
> Number of rows read = 2299
> Number of rows skipped = 0
> Number of rows inserted = 2299
> Number of rows updated = 0
> Number of rows rejected = 0
> Number of rows committed = 2299
>
> SQL3526N The modifier clause "IDENTITYIGNORE" is inconsistent with the
> current load command. Reason code: "3".
> Import results for VENDOR_PROVIDER_AUDIT
>
> Number of rows read = 1058
> Number of rows skipped = 0
> Number of rows inserted = 0
> Number of rows updated = 0
> Number of rows rejected = 1058
> Number of rows committed = 1058
>
>
> Number of rows read = 1058
> Number of rows skipped = 0
> Number of rows inserted = 1058
> Number of rows updated = 0
> Number of rows rejected = 0
> Number of rows committed = 1058
>
> Now, how do i search for Number of rows inserted = any other number
> other than 0 using Grep or any other command. Plz help me with this.
>
> Thanks in advance
>


grep "Number of rows inserted" file | grep -v -w 0

or

grep "Number of rows inserted" file | grep -v "= 0"

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2008, 10:53 AM
chaitu
 
Posts: n/a
Default Re: Searching a number other than 0

Thank a lot buddy.....It worked and helped me a lot.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2008, 10:53 AM
chaitu
 
Posts: n/a
Default Re: Searching a number other than 0

Hi Roy,

I have an other doubt. I have an other file and i want to print some 10
lines starting from a particular line. And i want to search this
particular line as grep SQL3109N and then start to print 10 lines after
that. How do i do that?

Thanks in advance.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-05-2008, 10:53 AM
Roy
 
Posts: n/a
Default Re: Searching a number other than 0

chaitu wrote:
> Hi Roy,
>
> I have an other doubt. I have an other file and i want to print some 10
> lines starting from a particular line. And i want to search this
> particular line as grep SQL3109N and then start to print 10 lines after
> that. How do i do that?
>
> Thanks in advance.
>


Sorry. I don't know an easy answer to that one. I would suspect awk
may do it but I am a novice at awk.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-05-2008, 10:54 AM
jthomp1515@yahoo.com
 
Posts: n/a
Default Re: Searching a number other than 0


Roy wrote:
> chaitu wrote:
> > Hi Roy,
> >
> > I have an other doubt. I have an other file and i want to print some 10
> > lines starting from a particular line. And i want to search this
> > particular line as grep SQL3109N and then start to print 10 lines after
> > that. How do i do that?
> >
> > Thanks in advance.
> >

>
> Sorry. I don't know an easy answer to that one. I would suspect awk
> may do it but I am a novice at awk.


Use grep -n to return the line number; add 20 to that , use that
number to `head` the file the file ; pipe the output of that thru
`tail -10` ...maybe?....

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-05-2008, 10:54 AM
l v
 
Posts: n/a
Default Re: Searching a number other than 0

chaitu wrote:
> Hi Roy,
>
> I have an other doubt. I have an other file and i want to print some 10
> lines starting from a particular line. And i want to search this
> particular line as grep SQL3109N and then start to print 10 lines after
> that. How do i do that?
>
> Thanks in advance.
>


One way is:

perl -nle "if (/SQL3109N/ .. $. == $e) {print} else {$e = $. + 10}" file

--

Len
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:41 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com