The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 04-23-2009
hkansal hkansal is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 69
Smile Logic only

Hello,

I assume that you are able to get the o/p in a plain file. Here are the steps that you should follow:
  1. Initiate a counter from 1
  2. Loop through the file line-wise
    1. Operate on current line according to value of counter
    2. Increment counter; reset to 1 if value is 6

Actions according to value of counter:
1 this is ur database
2 this is ur filename
3 take col 4 and 5 - use awk or cut
4 same as counter value 3
5 this is the status (I would take "Successful"/"failed" only)

at each step echo these values and use tabs to separate them, eg:

Code:
echo "\t<value>"

use \c to keep output on same line.

adjust the number of tabs as u need, u'll need to tweak a bit

Regards,
HKansal