Files
cheatsheet-tldr/tldr/jc
2024-04-26 00:13:28 +00:00

26 lines
494 B
Plaintext

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# jc
> Convert the output of multiple commands to JSON.
> More information: <https://github.com/kellyjonbrazil/jc>.
- Convert command output to JSON via pipe:
`{{ifconfig}} | jc {{--ifconfig}}`
- Convert command output to JSON via magic syntax:
`jc {{ifconfig}}`
- Output pretty JSON via pipe:
`{{ifconfig}} | jc {{--ifconfig}} -p`
- Output pretty JSON via magic syntax:
`jc -p {{ifconfig}}`