mirror of
https://github.com/mikefarah/yq.git
synced 2024-11-13 22:38:04 +00:00
Updated docs re creating a new array
This commit is contained in:
parent
0f8b864321
commit
e9b8265ca3
@ -458,7 +458,7 @@
|
|||||||
<p>Create scripts follow the same format as the update scripts.</p>
|
<p>Create scripts follow the same format as the update scripts.</p>
|
||||||
<p>Given a script create_instructions.yaml of:</p>
|
<p>Given a script create_instructions.yaml of:</p>
|
||||||
<pre><code class="yaml">b.c: 3
|
<pre><code class="yaml">b.c: 3
|
||||||
b.e[0].name: Howdy Partner
|
b.e[+].name: Howdy Partner
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<p>then</p>
|
<p>then</p>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -2,42 +2,42 @@
|
|||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-05-14</lastmod>
|
<lastmod>2019-05-16</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-05-14</lastmod>
|
<lastmod>2019-05-16</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-05-14</lastmod>
|
<lastmod>2019-05-16</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-05-14</lastmod>
|
<lastmod>2019-05-16</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-05-14</lastmod>
|
<lastmod>2019-05-16</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-05-14</lastmod>
|
<lastmod>2019-05-16</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-05-14</lastmod>
|
<lastmod>2019-05-16</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
<url>
|
<url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2019-05-14</lastmod>
|
<lastmod>2019-05-16</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
</urlset>
|
</urlset>
|
Binary file not shown.
@ -611,7 +611,7 @@
|
|||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<p>then</p>
|
<p>then</p>
|
||||||
<pre><code class="bash">yq w sample.yaml b.d[0] "new thing"
|
<pre><code class="bash">yq w sample.yaml b.d[+] "new thing"
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<p>will output:</p>
|
<p>will output:</p>
|
||||||
@ -781,7 +781,7 @@ b:
|
|||||||
|
|
||||||
<p>and a script update_instructions.yaml of:</p>
|
<p>and a script update_instructions.yaml of:</p>
|
||||||
<pre><code class="yaml">b.c: 3
|
<pre><code class="yaml">b.c: 3
|
||||||
b.e[0].name: Howdy Partner
|
b.e[+].name: Howdy Partner
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<p>then</p>
|
<p>then</p>
|
||||||
|
@ -20,7 +20,7 @@ Create scripts follow the same format as the update scripts.
|
|||||||
Given a script create_instructions.yaml of:
|
Given a script create_instructions.yaml of:
|
||||||
```yaml
|
```yaml
|
||||||
b.c: 3
|
b.c: 3
|
||||||
b.e[0].name: Howdy Partner
|
b.e[+].name: Howdy Partner
|
||||||
```
|
```
|
||||||
then
|
then
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ b:
|
|||||||
```
|
```
|
||||||
then
|
then
|
||||||
```bash
|
```bash
|
||||||
yq w sample.yaml b.d[0] "new thing"
|
yq w sample.yaml b.d[+] "new thing"
|
||||||
```
|
```
|
||||||
will output:
|
will output:
|
||||||
```yaml
|
```yaml
|
||||||
@ -214,7 +214,7 @@ b:
|
|||||||
and a script update_instructions.yaml of:
|
and a script update_instructions.yaml of:
|
||||||
```yaml
|
```yaml
|
||||||
b.c: 3
|
b.c: 3
|
||||||
b.e[0].name: Howdy Partner
|
b.e[+].name: Howdy Partner
|
||||||
```
|
```
|
||||||
then
|
then
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user