954,523 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

file proccessing and logic

Good morning all,

i have a text file contains following data.....
sec TID ATTRIBUTE
69013 1-3039-1 REGISTER
69013 1-3039-1 100
69013 1-3039-1 401
69013 1-3039-2 REGISTER
69013 1-3039-2 100
69013 2-3039-1 REGISTER
69013 3-3039-1 REGISTER
69013 4-3039-1 REGISTER
69013 1-3039-2 200
69013 2-3039-1 100
69013 2-3039-1 401
..................
..................
69023 193-3039-2 100
69023 193-3039-2401
69023 222-3039-1 REGISTER
69023 177-3039-2 100
69024 177-3039-2401
69024 214-3039-1 100
69024 214-3039-1 401
69024 214-3039-2 REGISTER
69024 223-3039-1 100
69024 223-3039-1 401
69024 223-3039-2 REGISTER
......................................................................................
i want an REG. , 401 and 200 arrays which contains TIDs values for first 10 seconds, that is from 69013 to 69023. and again for other 10 seconds..............
help as u can..............
thanking you ..............:)

singhabsk
Newbie Poster
16 posts since Nov 2010
Reputation Points: 10
Solved Threads: 1
 

here is one logic but i m not sure its correct or not lets see
flag=0;
While()
{
my (time,TID,ATTr.)=split(/ /,$_,3);
if (flag==0)
{
x=time+10;
flag=1;
}
while(time<=x)
{
do operation
}flag=0;
}
:)
waiting for reply

singhabsk
Newbie Poster
16 posts since Nov 2010
Reputation Points: 10
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: