Skip to content
Advertisement

Extracting values from .dat file in python

I have a file which is having pipe delimiter and wanted to convert delimiter from | to ^A Source file has data in key:Value pair. For eg. in the below given file SSLPROTOCOL is the Key and TLSv1.2 is value. I was looking for only the value with delimiter in the target file. Please sugesst

JavaScript

Output: I want values delimited with ^A, only with values e.g.:

JavaScript

Advertisement

Answer

This should do it:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement