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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-09-2008
manas_ranjan's Avatar
Registered User
 

Join Date: Jul 2007
Location: Amsterdam
Posts: 177
Search the file content in between the records

I have a file like this

QUEUE: <ITEM(69)> "/NLA///ACHO_EQU_IDX"
Q_KEY: <ITEM(69)> "/NLA///ACHO_EQU_IDX"
Q_TYPE: <VSTR(32)> "GEN_VSTR_INDEX"
QOBJ_TYPE: <VSTR(32)> "MSG_HISTORY_SEQ"
Q_DOMAIN: <VSTR(7)> "MESSAGE"
DUP_KEY_FLAG: <STR(1)> "Y"
PERIODIC_FLAG: <STR(1)> "N"
UNION_ID: <BITS(8)X> "00000000"
USED_BYTES: <LONG(10)X> "0"
ALLOCATED_BYTES: <LONG(10)X> "0"

QELEMENT: <LONG(10)> "1"
QELEMENT_ID: <LONG(10)S> "1"
QELEMENT_STATE: <VSTR(132)S> "JOIN"
VSTR_KEY$GEN_VSTR_INDEX: <VSTR(80)S> "EQUENS0002C081119081119081119"
SYSTIME$GEN_VSTR_INDEX: <TIME(23)S> "19-NOV-2008 20:55:34.38"
TXT$GEN_VSTR_INDEX: <VSTR(20)S> "2008111900000218"
HISTORY_COORDINATES: <HST_ID(23)S> "2/3"
MESSAGE_ID: <MSG_ID(17)S> "20081119/00000218"
END: <VSTR(48)> "QELEMENT"

QELEMENT: <LONG(10)> "2"
QELEMENT_ID: <LONG(10)S> "2"
QELEMENT_STATE: <VSTR(132)S> "JOIN"
VSTR_KEY$GEN_VSTR_INDEX: <VSTR(80)S> "EQUENS0002C081124081124081124"
SYSTIME$GEN_VSTR_INDEX: <TIME(23)S> "24-NOV-2008 12:51:51.83"
TXT$GEN_VSTR_INDEX: <VSTR(20)S> "2008112400000058"
HISTORY_COORDINATES: <HST_ID(23)S> "2/3"
MESSAGE_ID: <MSG_ID(17)S> "20081124/00000058"
END: <VSTR(48)> "QELEMENT"

QELEMENT: <LONG(10)> "3"
QELEMENT_ID: <LONG(10)S> "3"
QELEMENT_STATE: <VSTR(132)S> "JOIN"
VSTR_KEY$GEN_VSTR_INDEX: <VSTR(80)S> "EQUENS1100C081119081119081119"
SYSTIME$GEN_VSTR_INDEX: <TIME(23)S> "19-NOV-2008 20:54:15.93"
TXT$GEN_VSTR_INDEX: <VSTR(20)S> "2008111900000214"
HISTORY_COORDINATES: <HST_ID(23)S> "2/3"
MESSAGE_ID: <MSG_ID(17)S> "20081119/00000214"
END: <VSTR(48)> "QELEMENT"

QELEMENT: <LONG(10)> "4"
QELEMENT_ID: <LONG(10)S> "4"
QELEMENT_STATE: <VSTR(132)S> "JOIN"
VSTR_KEY$GEN_VSTR_INDEX: <VSTR(80)S> "EQUENS1100C081124081124081124"
SYSTIME$GEN_VSTR_INDEX: <TIME(23)S> "24-NOV-2008 11:15:48.27"
TXT$GEN_VSTR_INDEX: <VSTR(20)S> "2008112400000008"
HISTORY_COORDINATES: <HST_ID(23)S> "2/3"
MESSAGE_ID: <MSG_ID(17)S> "20081124/00000008"
END: <VSTR(48)> "QELEMENT"

QELEMENT: <LONG(10)> "5"
QELEMENT_ID: <LONG(10)S> "5"
QELEMENT_STATE: <VSTR(132)S> "JOIN"
VSTR_KEY$GEN_VSTR_INDEX: <VSTR(80)S> "EQUENS1100C081124081124081124"
SYSTIME$GEN_VSTR_INDEX: <TIME(23)S> "24-NOV-2008 12:17:44.78"
TXT$GEN_VSTR_INDEX: <VSTR(20)S> "2008112400000014"
HISTORY_COORDINATES: <HST_ID(23)S> "2/3"
MESSAGE_ID: <MSG_ID(17)S> "20081124/00000014"
END: <VSTR(48)> "QELEMENT"

END: <VSTR(48)> "QUEUE"
SHOW:[QUEUE:/NLA///ACHO_EQU_IDX ALL: END: ]
please find the attachment for more clarity .
but my concern is can i reform the text file into below o/p
TYPE MSG ID
EQUENS1100 20081124/00000014
20081124/00000008
20081119/00000214
EQUENS0002 20081124/00000058
20081119/00000218

this type column we fetched from VSTR_KEY$GEN_VSTR_INDEX in attached file and each types are associated with MESSAGE_ID .
any help will really appreciated........................
Attached Files
File Type: txt sample.txt (5.0 KB, 15 views)

Last edited by manas_ranjan; 12-09-2008 at 06:06 PM..
Sponsored Links
  #2 (permalink)  
Old 12-09-2008
manas_ranjan's Avatar
Registered User
 

Join Date: Jul 2007
Location: Amsterdam
Posts: 177
any suggestion on below problem....
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Signal Handling and Context Switches XComp High Level Programming 18 01-06-2009 04:30 PM
keep context in awk VTAWKVT Shell Programming and Scripting 2 05-23-2008 03:06 PM
selection of files based on its types ganapati UNIX for Advanced & Expert Users 3 02-04-2008 10:09 AM
Context Switching keelba UNIX for Advanced & Expert Users 2 11-15-2002 11:26 AM
Context Free Grammar Nisha High Level Programming 4 08-13-2002 09:03 AM



All times are GMT -4. The time now is 07:20 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0