mirror of
https://github.com/mikefarah/yq.git
synced 2024-12-19 20:19:04 +00:00
shorten filename in example
This commit is contained in:
parent
cd3813e285
commit
7598f73204
@ -95,7 +95,7 @@ yq e -n '.someNew="content"' > newfile.yml
|
||||
The best way to run a diff is to use `yq` to normalise the yaml files and then just use diff. Here is a simple example of using pretty print `-P` to normalise the styling and running diff:
|
||||
|
||||
```
|
||||
diff <(yq e -P 'sort_keys(..)' examples/data1.yaml) <(yq e -P 'sort_keys(..)' examples/data2.yaml)
|
||||
diff <(yq e -P 'sort_keys(..)' file1.yaml) <(yq e -P 'sort_keys(..)' file2.yaml)
|
||||
```
|
||||
|
||||
This way you can use the full power of `diff` and normalise the yaml files as you like.
|
||||
|
Loading…
Reference in New Issue
Block a user