jq를 사용하여 json 헤더가 포함된 csv 파일을 만들려고 합니다.
다음 조각이 있습니다https://jqplay.org/s/H_U5mxbTFW
질문:peerings > accept_vpc_info > tenant_id
합계 값을 인쇄하는 방법peerings > accept_vpc_info > vpc_id
내가 시도한 것:
JSON
{
"peerings": [
{
"accept_vpc_info": {
"tenant_id": "184a5",
"vpc_id": "0d11f"
},
"created_at": "2018-11-07T08:53:43",
"description": null,
"id": "0b19d",
"name": "NAME1",
"request_vpc_info": {
"tenant_id": "08a7b",
"vpc_id": "1645f"
},
"status": "ACTIVE",
"updated_at": "2018-11-07T09:47:44"
},
{
"accept_vpc_info": {
"tenant_id": "067eb",
"vpc_id": "17944"
},
"created_at": "2019-06-12T08:29:08",
"description": null,
"id": "0d34a",
"name": "NAME2",
"request_vpc_info": {
"tenant_id": "0fd7b",
"vpc_id": "102c9"
},
"status": "ACTIVE",
"updated_at": "2019-06-12T12:04:56"
},
{
"accept_vpc_info": {
"tenant_id": "0ae21",
"vpc_id": "071c4"
},
"created_at": "2019-02-21T09:07:35",
"description": null,
"id": "173e2",
"name": "NAME3",
"request_vpc_info": {
"tenant_id": "05a21",
"vpc_id": "0586e"
},
"status": "ACTIVE",
"updated_at": "2019-02-21T09:10:41"
}
]
}
황금빛 봄:
.[] | flatten | map({created_at,description,id,name,status,updated_at}) | (first | keys_unsorted) as $keys | map([to_entries[] | .value]) as $rows | $keys,$rows[] | join (", ")
및 를 추가하지 않고도 accept_vpc_info
작동합니다 request_vpc_info
.
나는 이것을 헤더로 추가하려고 시도했습니다 : ,,,,,,,,,,,,,,,,accept_vpc_info
accept_vpc_info_tenant_id
accept_vpc_info_vpc_id
created_at
description
id
name
request_vpc_info
request_vpc_info_tenant_id
request_vpc_info_vpc_id
status
updated_at
이 같은:
"accept_vpc_info__tenant_id","accept_vpc_info__vpc_id","created_at","description","id","name","request_vpc_info__tenant_id","request_vpc_info__vpc_id","status","updated_at"
"184a5","0d11f","2018-11-07T08:53:43","null","0b19d","NAME1","08a7b","1645f","ACTIVE","2018-11-07T09:47:44"
"067eb","17944","2019-06-12T08:29:08","null","0d34a","NAME2","0fd7b","102c9","ACTIVE","2019-06-12T12:04:56"
"0ae21","071c4","2019-02-21T09:07:35","null","173e2","NAME3","05a21","0586e","ACTIVE","2019-02-21T09:10:41"
peerings > accept_vpc_info > tenant_id
sum 값을 어떻게 인쇄할 수 있나요 peerings > accept_vpc_info > vpc_id
?
감사해요
답변1
jq를 사용하면 다음을 실행할 수 있습니다.
- (일부 필드만 선택한다고 가정) jq 필터 "x.jq"를 만듭니다.
["name","id","tenant","vpc"] , ### the csv header
(.peerings[] ### for all in peerings list
| [ .name,
.id,
.accept_vpc_info.tenant_id,
.accept_vpc_info.vpc_id
]
) | @csv
- 달리다!
$ jq -rf x.jq ex.json
"name","id","tenant","vpc"
"NAME1","0b19d","184a5","0d11f"
"NAME2","0d34a","067eb","17944"
"NAME3","173e2","0ae21","071c4"
답변2
를 사용하면 csvkit
Json을 CVS로 직접 번역할 수 있습니다.
$ in2csv -k peerings ex.json
accept_vpc_info/tenant_id,accept_vpc_info/vpc_id,created_at,description,id,name,request_vpc_info/tenant_id,request_vpc_info/vpc_id,status,updated_at
184a5,0d11f,2018-11-07T08:53:43,,0b19d,NAME1,08a7b,1645f,ACTIVE,2018-11-07T09:47:44
067eb,17944,2019-06-12T08:29:08,,0d34a,NAME2,0fd7b,102c9,ACTIVE,2019-06-12T12:04:56
0ae21,071c4,2019-02-21T09:07:35,,173e2,NAME3,05a21,0586e,ACTIVE,2019-02-21T09:10:41
in2csv
더 많은 옵션과 자세한 내용은 설명서를 참조하세요.
답변3
나는 보통 두 가지 도구를 동시에 사용하는 것을 좋아하지 않습니다.~해야 한다작업을 수행하지만 Miller의 (제한된) JSON을 CSV로 변환하는 기능을 사용하는 것을 고려할 수 있습니다. 이는 제한 사항이 실제로 도움이 되는 경우 중 하나인 것 같습니다(기본적으로 모든 것을 평면화하고 평면화된 필드 이름을 구성하므로).
$ mlr --prepipe 'jq ".[]"' --ijson --jflatsep __ --ocsv --quote-all cat file.json
"accept_vpc_info__tenant_id","accept_vpc_info__vpc_id","created_at","description","id","name","request_vpc_info__tenant_id","request_vpc_info__vpc_id","status","updated_at"
"184a5","0d11f","2018-11-07T08:53:43","","0b19d","NAME1","08a7b","1645f","ACTIVE","2018-11-07T09:47:44"
"067eb","17944","2019-06-12T08:29:08","","0d34a","NAME2","0fd7b","102c9","ACTIVE","2019-06-12T12:04:56"
"0ae21","071c4","2019-02-21T09:07:35","","173e2","NAME3","05a21","0586e","ACTIVE","2019-02-21T09:10:41"
답변4
이 문제는 보기보다 훨씬 쉬우며 일반적으로 다음과 같이 간단히 해결할 수 있습니다.두 번 실행하십시오 jq
.
다음 파이프라인을 고려해보세요.
VOICES="$(aws polly describe-voices)"
jq -r -s --argfile e <(echo "$VOICES" |\
jq '.[][] | select(.["SupportedEngines"][] == "neural") | to_entries')\
'[$e[0][].key], ($e[($e | keys)[]]|[.[].value|tostring]) | @tsv' <<< "$VOICES"
예를 들어:
{
"Voices": [
{
"Gender": "Male",
"Id": "Kevin",
"LanguageCode": "en-US",
"LanguageName": "US English",
"Name": "Kevin",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Filiz",
"LanguageCode": "tr-TR",
"LanguageName": "Turkish",
"Name": "Filiz",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Elin",
"LanguageCode": "sv-SE",
"LanguageName": "Swedish",
"Name": "Elin",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Astrid",
"LanguageCode": "sv-SE",
"LanguageName": "Swedish",
"Name": "Astrid",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Tatyana",
"LanguageCode": "ru-RU",
"LanguageName": "Russian",
"Name": "Tatyana",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Male",
"Id": "Maxim",
"LanguageCode": "ru-RU",
"LanguageName": "Russian",
"Name": "Maxim",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Carmen",
"LanguageCode": "ro-RO",
"LanguageName": "Romanian",
"Name": "Carmen",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Ines",
"LanguageCode": "pt-PT",
"LanguageName": "Portuguese",
"Name": "Inês",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Male",
"Id": "Cristiano",
"LanguageCode": "pt-PT",
"LanguageName": "Portuguese",
"Name": "Cristiano",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Vitoria",
"LanguageCode": "pt-BR",
"LanguageName": "Brazilian Portuguese",
"Name": "Vitória",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Male",
"Id": "Ricardo",
"LanguageCode": "pt-BR",
"LanguageName": "Brazilian Portuguese",
"Name": "Ricardo",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Camila",
"LanguageCode": "pt-BR",
"LanguageName": "Brazilian Portuguese",
"Name": "Camila",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Female",
"Id": "Maja",
"LanguageCode": "pl-PL",
"LanguageName": "Polish",
"Name": "Maja",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Male",
"Id": "Jan",
"LanguageCode": "pl-PL",
"LanguageName": "Polish",
"Name": "Jan",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Male",
"Id": "Jacek",
"LanguageCode": "pl-PL",
"LanguageName": "Polish",
"Name": "Jacek",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Ewa",
"LanguageCode": "pl-PL",
"LanguageName": "Polish",
"Name": "Ewa",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Ola",
"LanguageCode": "pl-PL",
"LanguageName": "Polish",
"Name": "Ola",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Male",
"Id": "Ruben",
"LanguageCode": "nl-NL",
"LanguageName": "Dutch",
"Name": "Ruben",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Lotte",
"LanguageCode": "nl-NL",
"LanguageName": "Dutch",
"Name": "Lotte",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Laura",
"LanguageCode": "nl-NL",
"LanguageName": "Dutch",
"Name": "Laura",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Ida",
"LanguageCode": "nb-NO",
"LanguageName": "Norwegian",
"Name": "Ida",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Liv",
"LanguageCode": "nb-NO",
"LanguageName": "Norwegian",
"Name": "Liv",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Seoyeon",
"LanguageCode": "ko-KR",
"LanguageName": "Korean",
"Name": "Seoyeon",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Female",
"Id": "Kazuha",
"LanguageCode": "ja-JP",
"LanguageName": "Japanese",
"Name": "Kazuha",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Tomoko",
"LanguageCode": "ja-JP",
"LanguageName": "Japanese",
"Name": "Tomoko",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Male",
"Id": "Takumi",
"LanguageCode": "ja-JP",
"LanguageName": "Japanese",
"Name": "Takumi",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Female",
"Id": "Mizuki",
"LanguageCode": "ja-JP",
"LanguageName": "Japanese",
"Name": "Mizuki",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Bianca",
"LanguageCode": "it-IT",
"LanguageName": "Italian",
"Name": "Bianca",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Male",
"Id": "Giorgio",
"LanguageCode": "it-IT",
"LanguageName": "Italian",
"Name": "Giorgio",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Carla",
"LanguageCode": "it-IT",
"LanguageName": "Italian",
"Name": "Carla",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Male",
"Id": "Karl",
"LanguageCode": "is-IS",
"LanguageName": "Icelandic",
"Name": "Karl",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Dora",
"LanguageCode": "is-IS",
"LanguageName": "Icelandic",
"Name": "Dóra",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Male",
"Id": "Mathieu",
"LanguageCode": "fr-FR",
"LanguageName": "French",
"Name": "Mathieu",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Lea",
"LanguageCode": "fr-FR",
"LanguageName": "French",
"Name": "Léa",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Female",
"Id": "Celine",
"LanguageCode": "fr-FR",
"LanguageName": "French",
"Name": "Céline",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Chantal",
"LanguageCode": "fr-CA",
"LanguageName": "Canadian French",
"Name": "Chantal",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Gabrielle",
"LanguageCode": "fr-CA",
"LanguageName": "Canadian French",
"Name": "Gabrielle",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Penelope",
"LanguageCode": "es-US",
"LanguageName": "US Spanish",
"Name": "Penélope",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Male",
"Id": "Miguel",
"LanguageCode": "es-US",
"LanguageName": "US Spanish",
"Name": "Miguel",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Lupe",
"LanguageCode": "es-US",
"LanguageName": "US Spanish",
"Name": "Lupe",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Female",
"Id": "Mia",
"LanguageCode": "es-MX",
"LanguageName": "Mexican Spanish",
"Name": "Mia",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Female",
"Id": "Lucia",
"LanguageCode": "es-ES",
"LanguageName": "Castilian Spanish",
"Name": "Lucia",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Male",
"Id": "Enrique",
"LanguageCode": "es-ES",
"LanguageName": "Castilian Spanish",
"Name": "Enrique",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Conchita",
"LanguageCode": "es-ES",
"LanguageName": "Castilian Spanish",
"Name": "Conchita",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Male",
"Id": "Geraint",
"LanguageCode": "en-GB-WLS",
"LanguageName": "Welsh English",
"Name": "Geraint",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Salli",
"LanguageCode": "en-US",
"LanguageName": "US English",
"Name": "Salli",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Male",
"Id": "Matthew",
"LanguageCode": "en-US",
"LanguageName": "US English",
"Name": "Matthew",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Female",
"Id": "Kimberly",
"LanguageCode": "en-US",
"LanguageName": "US English",
"Name": "Kimberly",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Female",
"Id": "Kendra",
"LanguageCode": "en-US",
"LanguageName": "US English",
"Name": "Kendra",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Male",
"Id": "Justin",
"LanguageCode": "en-US",
"LanguageName": "US English",
"Name": "Justin",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Male",
"Id": "Joey",
"LanguageCode": "en-US",
"LanguageName": "US English",
"Name": "Joey",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Female",
"Id": "Joanna",
"LanguageCode": "en-US",
"LanguageName": "US English",
"Name": "Joanna",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Female",
"Id": "Ivy",
"LanguageCode": "en-US",
"LanguageName": "US English",
"Name": "Ivy",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Female",
"Id": "Aria",
"LanguageCode": "en-NZ",
"LanguageName": "New Zealand English",
"Name": "Aria",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Ayanda",
"LanguageCode": "en-ZA",
"LanguageName": "South African English",
"Name": "Ayanda",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Raveena",
"LanguageCode": "en-IN",
"LanguageName": "Indian English",
"Name": "Raveena",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Aditi",
"LanguageCode": "en-IN",
"LanguageName": "Indian English",
"Name": "Aditi",
"AdditionalLanguageCodes": [
"hi-IN"
],
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Emma",
"LanguageCode": "en-GB",
"LanguageName": "British English",
"Name": "Emma",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Male",
"Id": "Brian",
"LanguageCode": "en-GB",
"LanguageName": "British English",
"Name": "Brian",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Female",
"Id": "Amy",
"LanguageCode": "en-GB",
"LanguageName": "British English",
"Name": "Amy",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Male",
"Id": "Russell",
"LanguageCode": "en-AU",
"LanguageName": "Australian English",
"Name": "Russell",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Nicole",
"LanguageCode": "en-AU",
"LanguageName": "Australian English",
"Name": "Nicole",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Olivia",
"LanguageCode": "en-AU",
"LanguageName": "Australian English",
"Name": "Olivia",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Vicki",
"LanguageCode": "de-DE",
"LanguageName": "German",
"Name": "Vicki",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Female",
"Id": "Marlene",
"LanguageCode": "de-DE",
"LanguageName": "German",
"Name": "Marlene",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Male",
"Id": "Hans",
"LanguageCode": "de-DE",
"LanguageName": "German",
"Name": "Hans",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Naja",
"LanguageCode": "da-DK",
"LanguageName": "Danish",
"Name": "Naja",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Male",
"Id": "Mads",
"LanguageCode": "da-DK",
"LanguageName": "Danish",
"Name": "Mads",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Gwyneth",
"LanguageCode": "cy-GB",
"LanguageName": "Welsh",
"Name": "Gwyneth",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Zhiyu",
"LanguageCode": "cmn-CN",
"LanguageName": "Chinese Mandarin",
"Name": "Zhiyu",
"SupportedEngines": [
"neural",
"standard"
]
},
{
"Gender": "Female",
"Id": "Zeina",
"LanguageCode": "arb",
"LanguageName": "Arabic",
"Name": "Zeina",
"SupportedEngines": [
"standard"
]
},
{
"Gender": "Female",
"Id": "Hala",
"LanguageCode": "ar-AE",
"LanguageName": "Gulf Arabic",
"Name": "Hala",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Arlet",
"LanguageCode": "ca-ES",
"LanguageName": "Catalan",
"Name": "Arlet",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Hannah",
"LanguageCode": "de-AT",
"LanguageName": "German",
"Name": "Hannah",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Ruth",
"LanguageCode": "en-US",
"LanguageName": "US English",
"Name": "Ruth",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Male",
"Id": "Stephen",
"LanguageCode": "en-US",
"LanguageName": "US English",
"Name": "Stephen",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Kajal",
"LanguageCode": "en-IN",
"LanguageName": "Indian English",
"Name": "Kajal",
"AdditionalLanguageCodes": [
"hi-IN"
],
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Hiujin",
"LanguageCode": "yue-CN",
"LanguageName": "Cantonese",
"Name": "Hiujin",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Female",
"Id": "Suvi",
"LanguageCode": "fi-FI",
"LanguageName": "Finnish",
"Name": "Suvi",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Male",
"Id": "Arthur",
"LanguageCode": "en-GB",
"LanguageName": "British English",
"Name": "Arthur",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Male",
"Id": "Daniel",
"LanguageCode": "de-DE",
"LanguageName": "German",
"Name": "Daniel",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Male",
"Id": "Liam",
"LanguageCode": "fr-CA",
"LanguageName": "Canadian French",
"Name": "Liam",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Male",
"Id": "Pedro",
"LanguageCode": "es-US",
"LanguageName": "US Spanish",
"Name": "Pedro",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Male",
"Id": "Sergio",
"LanguageCode": "es-ES",
"LanguageName": "Castilian Spanish",
"Name": "Sergio",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Male",
"Id": "Andres",
"LanguageCode": "es-MX",
"LanguageName": "Mexican Spanish",
"Name": "Andrés",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Male",
"Id": "Remi",
"LanguageCode": "fr-FR",
"LanguageName": "French",
"Name": "Rémi",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Male",
"Id": "Adriano",
"LanguageCode": "it-IT",
"LanguageName": "Italian",
"Name": "Adriano",
"SupportedEngines": [
"neural"
]
},
{
"Gender": "Male",
"Id": "Thiago",
"LanguageCode": "pt-BR",
"LanguageName": "Brazilian Portuguese",
"Name": "Thiago",
"SupportedEngines": [
"neural"
]
}
]
}
생산하다:
Gender Id LanguageCode LanguageName Name SupportedEngines
Male Kevin en-US US English Kevin ["neural"]
Female Elin sv-SE Swedish Elin ["neural"]
Female Ines pt-PT Portuguese Inês ["neural","standard"]
Female Vitoria pt-BR Brazilian Portuguese Vitória ["neural","standard"]
Female Camila pt-BR Brazilian Portuguese Camila ["neural","standard"]
Female Ola pl-PL Polish Ola ["neural"]
Female Laura nl-NL Dutch Laura ["neural"]
Female Ida nb-NO Norwegian Ida ["neural"]
Female Seoyeon ko-KR Korean Seoyeon ["neural","standard"]
Female Kazuha ja-JP Japanese Kazuha ["neural"]
Female Tomoko ja-JP Japanese Tomoko ["neural"]
Male Takumi ja-JP Japanese Takumi ["neural","standard"]
Female Bianca it-IT Italian Bianca ["neural","standard"]
Female Lea fr-FR French Léa ["neural","standard"]
Female Gabrielle fr-CA Canadian French Gabrielle ["neural"]
Female Lupe es-US US Spanish Lupe ["neural","standard"]
Female Mia es-MX Mexican Spanish Mia ["neural","standard"]
Female Lucia es-ES Castilian Spanish Lucia ["neural","standard"]
Female Salli en-US US English Salli ["neural","standard"]
Male Matthew en-US US English Matthew ["neural","standard"]
Female Kimberly en-US US English Kimberly ["neural","standard"]
Female Kendra en-US US English Kendra ["neural","standard"]
Male Justin en-US US English Justin ["neural","standard"]
Male Joey en-US US English Joey ["neural","standard"]
Female Joanna en-US US English Joanna ["neural","standard"]
Female Ivy en-US US English Ivy ["neural","standard"]
Female Aria en-NZ New Zealand English Aria ["neural"]
Female Ayanda en-ZA South African English Ayanda ["neural"]
Female Emma en-GB British English Emma ["neural","standard"]
Male Brian en-GB British English Brian ["neural","standard"]
Female Amy en-GB British English Amy ["neural","standard"]
Female Olivia en-AU Australian English Olivia ["neural"]
Female Vicki de-DE German Vicki ["neural","standard"]
Female Zhiyu cmn-CN Chinese Mandarin Zhiyu ["neural","standard"]
Female Hala ar-AE Gulf Arabic Hala ["neural"]
Female Arlet ca-ES Catalan Arlet ["neural"]
Female Hannah de-AT German Hannah ["neural"]
Female Ruth en-US US English Ruth ["neural"]
Male Stephen en-US US English Stephen ["neural"]
Female Kajal en-IN Indian English Kajal ["hi-IN"] ["neural"]
Female Hiujin yue-CN Cantonese Hiujin ["neural"]
Female Suvi fi-FI Finnish Suvi ["neural"]
Male Arthur en-GB British English Arthur ["neural"]
Male Daniel de-DE German Daniel ["neural"]
Male Liam fr-CA Canadian French Liam ["neural"]
Male Pedro es-US US Spanish Pedro ["neural"]
Male Sergio es-ES Castilian Spanish Sergio ["neural"]
Male Andres es-MX Mexican Spanish Andrés ["neural"]
Male Remi fr-FR French Rémi ["neural"]
Male Adriano it-IT Italian Adriano ["neural"]
Male Thiago pt-BR Brazilian Portuguese Thiago ["neural"]
첫 번째 jq
명령은 입력 JSON 데이터를 필터링하여 가 SupportedEngines
포함된 데이터 만 선택합니다 "neural"
. to_entries
키-값 쌍의 배열로 변환합니다.
결과 배열은 에 저장되며 $e
이 파일을 통해 두 번째 배열로 전달됩니다. jq
이 "외부"는 먼저 TSV 출력의 헤더로 보장되는 jq
배열의 첫 번째 개체의 키를 선택합니다 .$e
그런 다음 $e에서 각 개체의 값을 선택하고 tostring
이를 사용하여 문자열로 변환한 다음(이 예에서는 한 줄만 필요함) 형식을 @tsv
.