Converting data from PuTTY to YAML file

I have some data that I can accesss through a Linux command in PuTTY, but I need to convert this data into a .yaml file. The format of the data is as follows:

_name: Bob
age: '15'
___

_name: Alex
age: '17'
___

And so on. How can I parse through this data to create a .yaml file with {'key':'value'} for each person's name being the key and age being the value. So far, I've thought of converting this data to a text file and then using a for loop to parse through the "_name" and "age" text values, but I'm not sure where this would lead me. Any thoughts?



from Recent Questions - Stack Overflow https://ift.tt/3fctl7M
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation