Reputation: 187
I have my YAML file as below:
report_id: demographics
columns:
- date
- channel_id
- video_id
- claimed_status
- uploader_type
- live_or_on_demand
report_id: device_os
columns:
- date
- channel_id
- video_id
- asset_id
- claimed_status
- uploader_type
- live_or_on_demand
- subscribed_status
- country_code
- device_type
- operating_system
I wanted to parse my YAML file using shell script and wanted the answer as:
report_id: demographics
date
channel_id
video_id
claimed_status
uploader_type
live_or_on_demand
report_id: device_os
date
channel_id
video_id
asset_id
claimed_status
uploader_type
live_or_on_demand
subscribed_status
country_code
device_type
operating_system
Upvotes: 1
Views: 3103