i have a file name ABC.txt and it includes the following data:
login as: rokob
Using keyboard-interactive authentication.
Password:
Access denied
Using keyboard-interactive authentication.
Password:
Last login: Wed Jan 29 09:35:04 2020 from 10.2.2.59
Cmd > type 'help' for help
Cmd > READ,SBS,DN=3300111
CMDREC: 2020-01-29 10:27:04 : (003-001-3299) : READ,SBS,DN=3300111
DN: 3300111
APSID: 1
SSID: 1
SUBCLS: PRA
LINECLS: ISDN
SPCH: N
URDI: N
ADA: N
CHNET: N
SCRLOC: N
SCRTOL: N
SCRCOSTL: N
SCROTHER: N
SCRINT: N
OGP: ORD
OCHG: Y
TCHG: Y
ERCALLCLS: 0
CLIP: A
CMDRES: 2020-01-29 10:27:04 : (003-001-3299) : Success: 0: OK
Cmd > READ,SBS,DN=3312556
CMDREC: 2020-01-29 10:27:15 : (003-001-3300) : READ,SBS,DN=3312556
DN: 3312556
APSID: 1
SSID: 1
SUBCLS: PRA
LINECLS: ISDN
SPCH: N
URDI: N
ADA: N
CHNET: N
SCRLOC: N
SCRTOL: N
SCRCOSTL: N
SCROTHER: N
SCRINT: N
OGP: ORD
OCHG: Y
TCHG: Y
ERCALLCLS: 0
CLIP: A
CMDRES: 2020-01-29 10:27:15 : (003-001-3300) : Success: 0: OK
Cmd > READ,SBS,DN=3100950
CMDREC: 2020-01-29 10:27:25 : (003-001-3301) : READ,SBS,DN=3100950
DN: 3100950
APSID: 1
SSID: 1
SUBCLS: IL
LINECLS: LAG
ADA: N
CHNET: N
SCRLOC: N
SCRTOL: N
SCRCOSTL: N
SCROTHER: N
SCRINT: N
OGP: ORD
OCHG: Y
TCHG: Y
ERCALLCLS: 0
CLIP: A
CNP: A
CALLBAR: A
BARCLS12: Y
BARCLS13: Y
BARCLS14: Y
CMDRES: 2020-01-29 10:27:25 : (003-001-3301) : Success: 0: OK
Cmd > READ,SBS,DN=3100959
CMDERR: < DN : 3100959 does not exists in database >
CMDRES: 2020-01-29 10:27:35 : () : Error: 0303027: DN DOES NOT REGISTER
Cmd > READ,SBS,DN=3100952
CMDREC: 2020-01-29 10:27:44 : (003-001-3302) : READ,SBS,DN=3100952
DN: 3100952
APSID: 1
SSID: 1
SUBCLS: IL
LINECLS: LAG
ADA: N
CHNET: N
SCRLOC: N
SCRTOL: N
SCRCOSTL: N
SCROTHER: N
SCRINT: N
OGP: ORD
OCHG: Y
TCHG: Y
ERCALLCLS: 0
CMDRES: 2020-01-29 10:27:44 : (003-001-3302) : Success: 0: OK
Cmd > READ,SBS,DN=6728009
CMDREC: 2020-01-29 10:49:02 : (003-002-6357) : READ,SBS,DN=6728009
DN: 6728009
APSID: 2
SSID: 2
SUBCLS: IL
LINECLS: LAG
ADA: N
CHNET: N
SCRLOC: N
SCRTOL: N
SCRCOSTL: N
SCROTHER: N
SCRINT: N
OGP: ORD
OCHG: Y
TCHG: Y
ERCALLCLS: 2
CFU: A
CFUACTDN: 9072397
WUP: D
CALLBAR: A
BARCLS12: Y
REVCHG: A
CMDRES: 2020-01-29 10:49:03 : (003-002-6357) : Success: 0: OK
Cmd >
I would like to extract the following data only with its corresponding values:
DN, APSID,SSID,SUBCLS,LINECLS
Please if someone could provide me with a sample code i will really appreciate it.
Thank you