jq Ä¿¸Çµå·Î Á¤·ÄÇÏ´Â ¹æ¹ýÀ» ¾Ë°í ½Í½À´Ï´Ù.

   Á¶È¸ 1393   Ãßõ 0    

rpext-index.json (6.1K), Down : 1, 2022-10

 

linux 에서 jq sort 로  json 파일을 정렬 하고 싶습니다.

아래 내용중에서 releases 하위에 있는 엘리먼트들이 헤놀로지 모델_버전 이름들 인데요.

이 내용을 정렬하려면 어떻게 옵션을 주어야 할까요?

pocopico 님께 물어봤더니 걍 sort -n 쓰면 안되냐고 성의없게 대답을 해주시네요.

본인은 어떻게 잘 정렬을 하고 있으면서...ㅜㅜ

저도 제 rp-ext 들을 이쁘게 정렬해서 관리하고 싶어서 입니다.

부탁좀 드리겠습니다.

정렬할 파일도 별도 첨부했습니다.

아래 내용과 동일합니다.


{

  "id": "PeterSuh-Q3.igb",

  "url": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/rpext-index.json",

  "info": {

    "name": "igb",

    "description": "Adds Intel(R) Gigabit Ethernet Network Driver Support",

    "author_url": "https://github.com/PeterSuh-Q3",

    "packer_url": "https://github.com/PeterSuh-Q3/rp-ext/tree/main/igb",

    "help_url": "<todo>"

  },

  "releases": {

    "rs4021xsp_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/rs4021xsp_42218.json",

    "dva3219_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/dva3219_42218.json",

    "ds3615xs_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds3615xs_42218.json",

    "rs4021xsp_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/rs4021xsp_42218.json",

    "ds3615xs_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds3615xs_42218.json",

    "ds3617xs_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds3617xs_42218.json",

    "dva3219_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/dva3219_42218.json",

    "ds3617xs_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds3617xs_42218.json",

    "ds3622xsp_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds3622xsp_42218.json",

    "fs2500_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/fs2500_42218.json",

    "ds3622xsp_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds3622xsp_42218.json",

    "ds1621p_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds1621p_42218.json",

    "rs3618xs_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/rs3618xs_42218.json",

    "ds1621p_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds1621p_42218.json",

    "ds2422p_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds2422p_42218.json",

    "ds2422p_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds2422p_42218.json",

    "dva3221_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/dva3221_42218.json",

    "dva3221_42621": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/dva3221_42218.json",

    "dva3221_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/dva3221_42218.json",

    "dva1622_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/dva1622_42218.json",

    "ds1520p_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds1520p_42218.json",

    "rs3618xs_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/rs3618xs_42218.json",

    "fs2500_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/fs2500_42218.json",

    "ds1621xsp_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds1621xsp_42218.json",

    "ds918p_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds918p_42218.json",

    "ds1621xsp_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds1621xsp_42218.json",

    "ds918p_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds918p_42218.json",

    "ds1520p_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds1520p_42218.json",

    "ds920p_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds920p_42218.json",

    "ds920p_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds920p_42218.json",

    "rs3413xsp_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/rs3413xsp_42218.json",

    "rs3413xsp_42661": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/rs3413xsp_42218.json",

    "ds3617xs_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds3617xs_42218.json",

    "ds918p_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds918p_42218.json",

    "ds3615xs_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds3615xs_42218.json",

    "ds3622xsp_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds3622xsp_42218.json",

    "dva3221_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/dva3221_42218.json",

    "ds920p_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds920p_42218.json",

    "ds1621p_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds1621p_42218.json",

    "ds2422p_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds2422p_42218.json",

    "dva1622_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/dva1622_42218.json",

    "ds1520p_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds1520p_42218.json",

    "fs2500_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/fs2500_42218.json",

    "ds1621xsp_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds1621xsp_42218.json",

    "rs4021xsp_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/rs4021xsp_42218.json",

    "dva3219_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/dva3219_42218.json",

    "rs3618xs_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/rs3618xs_42218.json",

    "rs3413xsp_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/rs3413xsp_42218.json",

    "ds1019p_42962": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds1019p_42218.json",

    "ds1019p_42218": "https://raw.githubusercontent.com/PeterSuh-Q3/rp-ext/master/igb/releases/ds1019p_42218.json",

    "zendofmodel": "endofurls"

  }

}

image
ªÀº±Û Àϼö·Ï ½ÅÁßÇÏ°Ô.
ÀÚ¹®ÀÚ´ä ÇÕ´Ï´Ù. À̸®Àú¸® ±¸±Û¸µ ÇÏ´Ù°¡ ¾ó··¶×¶¥ ã¾Æ ³»¾ú³×¿ä.^^

jq -S '.' rpext-index.json


QnA
Á¦¸ñPage 204/5679
2014-05   4942626   Á¤ÀºÁØ1
2015-12   1479433   ¹é¸Þ°¡
05-12   1371   ¯´Ô
2021-09   1371   ¹Ù¶÷°õµ¹
2022-06   1371   µå¸®µ¥ÀÌ
2023-06   1371   Å©¸®¹Ì
2022-07   1371   ±Ç¿ÀÁØ
2023-09   1371   L2½ºÀ§Ä¡
01-02   1372   µö¸¶Àεå
2023-08   1372   aira
2023-11   1372   ¹«½î»Ôó·³
2023-09   1372   ¹«½î»Ôó·³
05-03   1372   ÇϽÂÇù
04-01   1372   ±èÁØÀ¯
06-28   1372   ÄĹÚ
2022-04   1372   CPU4
2022-12   1372   ¹Ú¹®Çü
06-13   1372   Á¤ÀǼ®
2022-05   1372   »ßµ¹À̽½ÇÄÀÌ
2023-10   1372   °æ¹ÚÇѽùÎ
07-13   1373   ¿¥ºê¸®¿À
2023-01   1373   È£¹Ú°í±¸¸¶