Scroll to navigation

jc(1) JSON CLI output utility jc(1)

NAME

jc - JSONifies the output of many CLI tools and file-types

SYNOPSIS

COMMAND | jc PARSER [OPTIONS]


or magic syntax:


jc [OPTIONS] COMMAND

DESCRIPTION

jc JSONifies the output of many CLI tools and file-types for easier parsing in scripts. jc accepts piped input from STDIN and outputs a JSON representation of the previous command's output to STDOUT. Alternatively, the "magic" syntax can be used by prepending jc to the command to be converted. Options can be passed to jc immediately before the command is given. (Note: command aliases are not supported).

OPTIONS

Parsers:

airport -I command parser
airport -s command parser
arp command parser
blkid command parser
cksum and sum command parser
crontab command and file parser
crontab file parser with user support
CSV file parser
date command parser
df command parser
dig command parser
dmidecode command parser
du command parser
env and printenv command parser
file command parser
free command parser
fstab file parser
/etc/group file parser
/etc/gshadow file parser
hash BASH builtin command parser
md5, md5sum, shasum, sha1sum, sha224sum, sha256sum, sha384sum, and sha512sum command parser
hciconfig command parser
history command parser
/etc/hosts file parser
id command parser
ifconfig command parser
INI file parser
iptables command parser
iw dev <device> scan command parser
jobs command parser
Key/Value file parser
last and lastb command parser
ls and vdir command parser
lsblk command parser
lsmod command parser
lsof command parser
mount command parser
netstat command parser
ntpq -p command parser
/etc/passwd file parser
ping command parser
pip list command parser
pip show command parser
ps command parser
route command parser
/etc/shadow file parser
ss command parser
stat command parser
sysctl command parser
systemctl command parser
systemctl list-jobs command parser
systemctl list-sockets command parser
systemctl list-unit-files command parser
timedatectl status command parser
tracepath command parser
traceroute command parser
uname -a command parser
uptime command parser
w command parser
wc command parser
who command parser
XML file parser
YAML file parser

Options:

about jc
debug - show traceback (-dd for verbose traceback)
monochrome output
pretty print output
quiet - suppress warnings
raw JSON output

Example: ls -al | jc --ls -p

or using the magic syntax:

jc -p ls -al

2021-01-05 1.14.3