We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,668 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

GAWK

Hi every body,

i have this file example :

TD1
TD2
TD3
.
.
.TDn

<DIE_1>
xxxxxx
<\DIE_1>
<TD1>
information 1
inormation n
<\TD1>
<TDq>
information
<\TD_q>
.
.
.
<DIE_m>
xxxxxx
<\DIE_m>
<TD3>
information 1
inormation n
<\TD3>
<TDP>
information
<\TD_p>


for example i can find TD3 in DIE_n and in DIE_p and this is true for each TD.

i want to print in each new file information of TDn and relative DIE where i find it, for example if TD3 is in DIE_n and DIE_p i will print this two files :

file1
<DIE_n>
xxxxxx
<\DIE_n>
<TD3>
information 1
inormation n
<\TD3>

file 2

<DIE_p>
xxxxxx
<\DIE_p>
<TD3>
information 1
inormation n
<\TD3>

please note that the information in TD3 of each DIE is not similar to the other.

who can use gawk for example to do that, it's hard for me.

many thanks

1
Contributor
0
Replies
1
View
kamel.kimo
Newbie Poster
1 post since Mar 2009
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.4964 seconds using 2.49MB