mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
26 lines
530 B
JSON
26 lines
530 B
JSON
---
|
|
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#usage>.
|
|
|
|
- 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|--pretty]}}`
|
|
|
|
- Output pretty JSON via magic syntax:
|
|
|
|
`jc {{[-p|--pretty]}} {{ifconfig}}`
|