If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > command to Grep the particular word

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-06-09, 08:25
shijoe shijoe is offline
Registered User
 
Join Date: Mar 2009
Posts: 13
command to Grep the particular word

sample.log
----------
Verifying file ABC.TXT ...
Count check OK for file ABC.TXT
Check File rowcount: 919526 , trailer rowcount: 919526
Bulk Copy into Target table TABLE_ABC started Mon Apr 6 04:16:52 EDT 2009

In the sample.log
Check File row count is the count for text file ABC.TXT and
trailer count is the coutnt for TABLE_ABC table

we need the grep command or script to grep the count like this

ABC.TXT 919526 TABLE_ABC 919526
Reply With Quote
  #2 (permalink)  
Old 04-07-09, 03:25
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
I would use a scripting language like AWK or Perl for this. 'grep' won't help you there because it only searches for matching/non-matching lines.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On