Files
tldr/pages.zh/common/jc.md

20 lines
410 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# jc
> 将多个命令的输出转换为 JSON。
> 更多信息:<https://github.com/kellyjonbrazil/jc>。
- 通过管道将命令输出转换为 JSON
`{{ifconfig}} | jc {{--ifconfig}}`
- 通过魔法语法将命令输出转换为 JSON
`jc {{ifconfig}}`
- 通过管道输出美化的 JSON
`{{ifconfig}} | jc {{--ifconfig}} -p`
- 通过魔法语法输出美化的 JSON
`jc -p {{ifconfig}}`