← 返回命令列表

Linux command

jc 命令

文本

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Parse command output

[command] | jc --[parser]

Parse ps output

ps aux | jc --ps

Parse ls output

ls -l | jc --ls

Parse ifconfig

ifconfig | jc --ifconfig

Parse with pretty output

df | jc --df -p

List available parsers

jc -a

Parse file contents

jc --[parser] < [file.txt]

说明

jc converts the output of dozens of standard Unix commands into structured JSON or YAML format, enabling piping to JSON-aware tools like jq for automated processing and scripting.

参数

--_PARSER_
Parser name (ps, ls, df, ifconfig, etc.).
-a, --about
List available parsers.
-p, --pretty
Pretty print JSON output.
-r, --raw
Raw parser output.
-q, --quiet
Suppress warnings.
-m, --monochrome
Disable colored output.
-M, --meta-out
Include metadata in output (timestamp, parser name, exit codes).
-C, --force-color
Force colored output even when piping.
-d, --debug
Enable debug mode (use -dd for verbose).
-y, --yaml-out
Output in YAML format instead of JSON.
-s, --slurp
Combine multiple lines into a JSON array.
-u, --unbuffer
Disable output buffering for streaming.
-v, --version
Display version information.
--help
Display help information.

FAQ

What is the jc command used for?

jc converts the output of dozens of standard Unix commands into structured JSON or YAML format, enabling piping to JSON-aware tools like jq for automated processing and scripting.

How do I run a basic jc example?

Run `[command] | jc --[parser]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --_PARSER_ do in jc?

Parser name (ps, ls, df, ifconfig, etc.).