Replies: 2 comments
-
I've been doing something sort of similar to this recently. If you're alright using json/%: references.yml yml/%
cat $^ | yq 'explode(.)' -o j > $@.json This will take each file, cat the $: make json/*
cat references.yml yml/* | yq 'explode(.)' -o j > json/*.json |
Beta Was this translation helpful? Give feedback.
-
I did 'solve' it by using something like this, for the moment that is working. The problem I also had was that each file needed to end with an empty line that is the <(echo) .
Inside an older code I use awk 1
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
H!,
Is this possible out the box with yq?
I'm trying somethings but I guess it is not ?
My goal is to create readable yml files, and than export the output to json.
I don't want to work for example with the raw id's but with an alias.
references.yml
something.yml
First I did try to modify the import/include/load line for line in something.yml
something.yml
And then do this
But nothing worked, then i did try (found in the manual):
Din't work either...
Do I have to make a shell script wrapper to first include the references.yml file info something.yml and than process it?
The end product don't need the content from (reference_id) references.yml , I don't need that in the json.
I only want them to fill the keys inside something.yml
Beta Was this translation helpful? Give feedback.
All reactions