GS*8*****
ST*1********
A*
B*
E*
RMR*123455(This is the unique number to locate this row)
F*
SE*1***
GE**
GS*9*****
ST*2
H*
J*
RMR*567889(This is the unique number to locate this row)
L*
SE*
GE*****
With the unique number above, I want to fetch the line number of the corresponding GS** and GE***
well,i haven't use awk for a long time and i wrote that code without too much thinking,do u mean this kind of usage is seldom to see?:)I saw the man pages just now and it seems that ~ can be used as match a pattern either quoted by // or "".I used the "+" to catenate a string and a value,however,i'm not sure it's a right way,but it did gave a correct result here.
Remarkable. + is not a concatenation character in awk, but it does something here. But what?
....
I think I figured it out. The + sign forces what follows into numerical context, but also what procedes it. Non-numerical characters turn into 0 (zero) So it becomes equivalent to:
Yeah I do have the value in that as mentioned below. Even your latest code didnt get me any result.
GS*071000013*102562451P*101208*0503*443432*X*003050
ST*820*21321
BPR*C*192388.20*C*ACH*CCD*01*011900254*Z*56065758*56065758 **01*071000013*DA*5529085*101208
TRN*1*011900253240679*56065758
REF*TN*2132132132144*TRACE NUMBER FROM THE ACH PAYMENT
DTM*009*101207
N1*PR*AMER. PAY. SYS.*91*56065758
ENT*1
N1*PE* 19308540
RMR*TN*12322432343**192387.20*192388.20
RMR*TN*012345678777**1*1
SE*000010*342050361
ST*820*342050362
BPR*C*250.00*C*ACH*CTX***DA*232994246B*232994246B**01*071000013*DA*5529085*101208
TRN*1*53000217688618
REF*TN*21321*TRACE NUMBER FROM THE ACH PAYMENT
N1*PR*ALLIANCEONE*91*7203446150923
N1*PE*QWEST
ENT*1
RMR*IV*7203446151111**250.00
SE*000009*213213
GE*2*21321