I am having difficulties parsing my data. In the file shown below, I want to get the characters after BIG**20021208*00001**
. I tried sed '/BIG.20021208.00001\**/!d;s///;s/\*.*//'
but it doesn't work. I think the problem has to do with the line separator (…
).
BIG*20021208*00001**A1001…
TO*7284*0001…BIG*20021208*00001**A999…
NN*ST*XYZ Test Corporation*9*122334455…
NU*987 ELS.…
N4**NY*98765…
ITD*01*3*2**30**45*****60…
N3*123 Highway Street…
N4**12345…
ITD*001*3*2**30**30*****60…
BIG*20021208*00001**8263-83313…
ITD*001*3*2**30**30*****60…
BIG*20021208*00001**8263-83313…
My expected output is:
A1001
8263-83313
8263-83313
BG
instead ofBIG
is that a typo?