Grep strings from file and put in Column
Dear Experts,
My file contains below-
GET:SUB:ISI,432350414557432;
RESP:0:MD,019352020633:ISI,432350414557432:T11,1:T21,1:T22,1:B16,1:T62,1:BAIC,0:BAOC,1:BOIC,0:BIRO,0 :BORO,0:PAID,1;
GET:SUB:ISI,432350414581060;
RESP:0:MD,019352020743:ISI,432350414581060:T11,1:T21,1:T22,1:B16,1:T62,1:BAIC,0:BAOC,0:BOIC,0:BIRO,0 :BORO,0:PAID,0;
GET:SUB:ISI,432350211029016;
RESP:11000003;
GET:SUB:ISI,432350414073552;
RESP:0:MD,019352032067:ISI,432350414073552:T11,1:T21,1:T22,1:B16,1:T62,1:BAIC,0:BAOC,0:BOIC,0:BIRO,0 :BORO,0:PAID,1;
I want make a script like below-
if find-
RESP:0:MD,019352020633:ISI,432350414557432:T11,1:T21,1:T22,1:B16,1:T62,1:BAIC,0:BAOC,1:BOIC,0:BIRO,0 :BORO,0:PAID,1;
then PAID,1 printf "paid"
else PAID,0 printf "non-paid"
if find-
RESP:11000003
then RESP:11000003 printf "not-exist"
So, after run the script output will be for the above file-
paid
non-paid
not exits
paid
//purple