Hands-on task
This task is step 10 of the course “JSON, YAML and XML in the terminal”
jq: to_entries into key=value pairs
/root/conf.json holds a flat object with connection settings (strings, numbers, booleans). Convert it into lines of the form key=value (one per key) and write them to /root/conf.env — like in a .env file.
Reference:jq
What you'll practise:
- jq
- to_entries
- interpolation
- -r
- object to pairs