{"url":"https://ryuichi1208.hateblo.jp/entry/2020/05/09/223524","version":"1.0","provider_name":"Hatena Blog","blog_url":"https://ryuichi1208.hateblo.jp/","blog_title":"\u5730\u65b9\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u5b66\u7fd2\u65e5\u8a18","height":"190","title":"\u30b3\u30de\u30f3\u30c9\u7d50\u679c\u3092json\u3078","author_name":"ryuichi1208","published":"2020-05-09 22:35:24","categories":[],"provider_url":"https://hatena.blog","type":"rich","author_url":"https://blog.hatena.ne.jp/ryuichi1208/","width":"100%","description":"import os import sys import json import subprocess print(json.dumps(dict([(c, subprocess.getoutput(c).split('\\n')) for c in sys.argv[1:]]))) \u30b3\u30de\u30f3\u30c9\u7d50\u679c\u3092\u3072\u305f\u3059\u3089json\u3078\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3002\u30ef\u30f3\u30e9\u30a4\u30ca\u30fc\u3067\u3067\u304d\u306a\u304b\u3063\u305f\u306e\u3067\u4ed5\u65b9\u306a\u304fpython\u3067\u5b9f\u88c5\u3002 $ python3 a.py ls uname df | jq . { \"ls\": [ \"LICENSE\", \"Makefile\", \"README.md\", \"a.py\", \"linux\", \"mac\", \"w\u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fryuichi1208.hateblo.jp%2Fentry%2F2020%2F05%2F09%2F223524\" title=\"\u30b3\u30de\u30f3\u30c9\u7d50\u679c\u3092json\u3078 - \u5730\u65b9\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u5b66\u7fd2\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null}