2017-10-30 3 views

答えて

2

入力して、JQのmanページを見てみましょう:

man jq 

はコンマの使用上の段落があり、

, 

If two filters are separated by a comma, then the input will be fed 
into both and there will be multiple outputs: first, all of the outputs 
produced by the left expression, and then all of the outputs produced 
by the right. For instance, filter .foo, .bar, produces both the "foo" 
fields and "bar" fields as separate outputs. 

:-)からも

+1

をman page: '演算子を理解すると、jqの配列構文 を別の意味で見ることができます。式[1,2,3]はカンマ区切りの組み込みの 構文を使用していません代わりに[]演算子 ator(結果を収集する)を式1,2,3に適用すると、異なる結果が3つ生成されます( ' )。' '1'、' 2'、 '3'は単に入力を無視して適切な数値を生成し、結果を結合する'、 'でフィルタするだけです。 – chepner

+0

jqマニュアルの[Comma:、](https://stedolan.github.io/jq/manual/#Comma :,)も参照してください。しかし、 '、'がやや異なった振る舞いをする場所がいくつか存在することに注意してください(例えば、パターンやオブジェクトコンストラクタを破壊する)。 – jq170727

0

jqの複数のフィルタはカンマで区切られています。 . , .は、現在のコンテキストの2回を意味するので、出力を複製します。

関連する問題