1jc(1)                            JSON Convert                            jc(1)
2
3
4

NAME

6       jc  -  JSON Convert JSONifies the output of many CLI tools, file-types,
7       and strings
8

SYNOPSIS

10       Standard syntax:
11
12              COMMAND | jc [SLICE] [OPTIONS] PARSER
13
14              cat FILE | jc [SLICE] [OPTIONS] PARSER
15
16              echo STRING | jc [SLICE] [OPTIONS] PARSER
17
18       Magic syntax:
19
20              jc [SLICE] [OPTIONS] COMMAND
21
22              jc [SLICE] [OPTIONS] /proc/<path-to-procfile>
23
24

DESCRIPTION

26       jc JSONifies the output of  many  CLI  tools,  file-types,  and  common
27       strings  for  easier  parsing  in  scripts. jc accepts piped input from
28       STDIN and outputs a JSON representation of the previous command's  out‐
29       put  to  STDOUT.   Alternatively,  the  "Magic"  syntax  can be used by
30       prepending jc to the command to be converted. Options can be passed  to
31       jc  immediately before the command is given. (Note: "Magic" syntax does
32       not support shell builtins or command aliases)
33
34

OPTIONS

36       Parsers:
37
38
39
40              --acpi `acpi` command parser
41
42
43              --airport
44                     `airport -I` command parser
45
46
47              --airport-s
48                     `airport -s` command parser
49
50
51              --arp  `arp` command parser
52
53
54              --asciitable
55                     ASCII and Unicode table parser
56
57
58              --asciitable-m
59                     multi-line ASCII and Unicode table parser
60
61
62              --blkid
63                     `blkid` command parser
64
65
66              --bluetoothctl
67                     `bluetoothctl` command parser
68
69
70              --cbt  `cbt` (Google Bigtable) command parser
71
72
73              --cef  CEF string parser
74
75
76              --cef-s
77                     CEF string streaming parser
78
79
80              --certbot
81                     `certbot` command parser
82
83
84              --chage
85                     `chage --list` command parser
86
87
88              --cksum
89                     `cksum` and `sum` command parser
90
91
92              --clf  Common and Combined Log Format file parser
93
94
95              --clf-s
96                     Common and Combined Log Format file streaming parser
97
98
99              --crontab
100                     `crontab` command and file parser
101
102
103              --crontab-u
104                     `crontab` file parser with user support
105
106
107              --csv  CSV file parser
108
109
110              --csv-s
111                     CSV file streaming parser
112
113
114              --date `date` command parser
115
116
117              --datetime-iso
118                     ISO 8601 Datetime string parser
119
120
121              --df   `df` command parser
122
123
124              --dig  `dig` command parser
125
126
127              --dir  `dir` command parser
128
129
130              --dmidecode
131                     `dmidecode` command parser
132
133
134              --dpkg-l
135                     `dpkg -l` command parser
136
137
138              --du   `du` command parser
139
140
141              --email-address
142                     Email Address string parser
143
144
145              --env  `env` command parser
146
147
148              --file `file` command parser
149
150
151              --find `find` command parser
152
153
154              --findmnt
155                     `findmnt` command parser
156
157
158              --finger
159                     `finger` command parser
160
161
162              --free `free` command parser
163
164
165              --fstab
166                     `/etc/fstab` file parser
167
168
169              --git-log
170                     `git log` command parser
171
172
173              --git-log-s
174                     `git log` command streaming parser
175
176
177              --git-ls-remote
178                     `git ls-remote` command parser
179
180
181              --gpg  `gpg --with-colons` command parser
182
183
184              --group
185                     `/etc/group` file parser
186
187
188              --gshadow
189                     `/etc/gshadow` file parser
190
191
192              --hash `hash` command parser
193
194
195              --hashsum
196                     hashsum command parser (`md5sum`, `shasum`, etc.)
197
198
199              --hciconfig
200                     `hciconfig` command parser
201
202
203              --history
204                     `history` command parser
205
206
207              --host `host` command parser
208
209
210              --hosts
211                     `/etc/hosts` file parser
212
213
214              --id   `id` command parser
215
216
217              --ifconfig
218                     `ifconfig` command parser
219
220
221              --ini  INI file parser
222
223
224              --ini-dup
225                     INI with duplicate key file parser
226
227
228              --iostat
229                     `iostat` command parser
230
231
232              --iostat-s
233                     `iostat` command streaming parser
234
235
236              --ip-address
237                     IPv4 and IPv6 Address string parser
238
239
240              --iptables
241                     `iptables` command parser
242
243
244              --ip-route
245                     `ip route` command parser
246
247
248              --iso-datetime
249                     Deprecated - please use datetime-iso
250
251
252              --iw-scan
253                     `iw dev [device] scan` command parser
254
255
256              --iwconfig
257                     `iwconfig` command parser
258
259
260              --jar-manifest
261                     Java MANIFEST.MF file parser
262
263
264              --jobs `jobs` command parser
265
266
267              --jwt  JWT string parser
268
269
270              --kv   Key/Value file and string parser
271
272
273              --last `last` and `lastb` command parser
274
275
276              --ls   `ls` command parser
277
278
279              --ls-s `ls` command streaming parser
280
281
282              --lsattr
283                     `lsattr` command parser
284
285
286              --lsb-release
287                     `lsb_release` command parser
288
289
290              --lsblk
291                     `lsblk` command parser
292
293
294              --lsmod
295                     `lsmod` command parser
296
297
298              --lsof `lsof` command parser
299
300
301              --lspci
302                     `lspci -mmv` command parser
303
304
305              --lsusb
306                     `lsusb` command parser
307
308
309              --m3u  M3U and M3U8 file parser
310
311
312              --mdadm
313                     `mdadm` command parser
314
315
316              --mount
317                     `mount` command parser
318
319
320              --mpstat
321                     `mpstat` command parser
322
323
324              --mpstat-s
325                     `mpstat` command streaming parser
326
327
328              --netstat
329                     `netstat` command parser
330
331
332              --nmcli
333                     `nmcli` command parser
334
335
336              --nsd-control
337                     `nsd-control` command parser
338
339
340              --ntpq `ntpq -p` command parser
341
342
343              --openvpn
344                     openvpn-status.log file parser
345
346
347              --os-prober
348                     `os-prober` command parser
349
350
351              --os-release
352                     `/etc/os-release` file parser
353
354
355              --passwd
356                     `/etc/passwd` file parser
357
358
359              --pci-ids
360                     `pci.ids` file parser
361
362
363              --pgpass
364                     PostgreSQL password file parser
365
366
367              --pidstat
368                     `pidstat -H` command parser
369
370
371              --pidstat-s
372                     `pidstat -H` command streaming parser
373
374
375              --ping `ping` and `ping6` command parser
376
377
378              --ping-s
379                     `ping` and `ping6` command streaming parser
380
381
382              --pip-list
383                     `pip list` command parser
384
385
386              --pip-show
387                     `pip show` command parser
388
389
390              --plist
391                     PLIST file parser
392
393
394              --postconf
395                     `postconf -M` command parser
396
397
398              --proc `/proc/` file parser
399
400
401              --proc-buddyinfo
402                     `/proc/buddyinfo` file parser
403
404
405              --proc-consoles
406                     `/proc/consoles` file parser
407
408
409              --proc-cpuinfo
410                     `/proc/cpuinfo` file parser
411
412
413              --proc-crypto
414                     `/proc/crypto` file parser
415
416
417              --proc-devices
418                     `/proc/devices` file parser
419
420
421              --proc-diskstats
422                     `/proc/diskstats` file parser
423
424
425              --proc-filesystems
426                     `/proc/filesystems` file parser
427
428
429              --proc-interrupts
430                     `/proc/interrupts` file parser
431
432
433              --proc-iomem
434                     `/proc/iomem` file parser
435
436
437              --proc-ioports
438                     `/proc/ioports` file parser
439
440
441              --proc-loadavg
442                     `/proc/loadavg` file parser
443
444
445              --proc-locks
446                     `/proc/locks` file parser
447
448
449              --proc-meminfo
450                     `/proc/meminfo` file parser
451
452
453              --proc-modules
454                     `/proc/modules` file parser
455
456
457              --proc-mtrr
458                     `/proc/mtrr` file parser
459
460
461              --proc-pagetypeinfo
462                     `/proc/pagetypeinfo` file parser
463
464
465              --proc-partitions
466                     `/proc/partitions` file parser
467
468
469              --proc-slabinfo
470                     `/proc/slabinfo` file parser
471
472
473              --proc-softirqs
474                     `/proc/softirqs` file parser
475
476
477              --proc-stat
478                     `/proc/stat` file parser
479
480
481              --proc-swaps
482                     `/proc/swaps` file parser
483
484
485              --proc-uptime
486                     `/proc/uptime` file parser
487
488
489              --proc-version
490                     `/proc/version` file parser
491
492
493              --proc-vmallocinfo
494                     `/proc/vmallocinfo` file parser
495
496
497              --proc-vmstat
498                     `/proc/vmstat` file parser
499
500
501              --proc-zoneinfo
502                     `/proc/zoneinfo` file parser
503
504
505              --proc-driver-rtc
506                     `/proc/driver/rtc` file parser
507
508
509              --proc-net-arp
510                     `/proc/net/arp` file parser
511
512
513              --proc-net-dev
514                     `/proc/net/dev` file parser
515
516
517              --proc-net-dev-mcast
518                     `/proc/net/dev_mcast` file parser
519
520
521              --proc-net-if-inet6
522                     `/proc/net/if_inet6` file parser
523
524
525              --proc-net-igmp
526                     `/proc/net/igmp` file parser
527
528
529              --proc-net-igmp6
530                     `/proc/net/igmp6` file parser
531
532
533              --proc-net-ipv6-route
534                     `/proc/net/ipv6_route` file parser
535
536
537              --proc-net-netlink
538                     `/proc/net/netlink` file parser
539
540
541              --proc-net-netstat
542                     `/proc/net/netstat` file parser
543
544
545              --proc-net-packet
546                     `/proc/net/packet` file parser
547
548
549              --proc-net-protocols
550                     `/proc/net/protocols` file parser
551
552
553              --proc-net-route
554                     `/proc/net/route` file parser
555
556
557              --proc-net-tcp
558                     `/proc/net/tcp` and `/proc/net/tcp6` file parser
559
560
561              --proc-net-unix
562                     `/proc/net/unix` file parser
563
564
565              --proc-pid-fdinfo
566                     `/proc/<pid>/fdinfo/<fd>` file parser
567
568
569              --proc-pid-io
570                     `/proc/<pid>/io` file parser
571
572
573              --proc-pid-maps
574                     `/proc/<pid>/maps` file parser
575
576
577              --proc-pid-mountinfo
578                     `/proc/<pid>/mountinfo` file parser
579
580
581              --proc-pid-numa-maps
582                     `/proc/<pid>/numa_maps` file parser
583
584
585              --proc-pid-smaps
586                     `/proc/<pid>/smaps` file parser
587
588
589              --proc-pid-stat
590                     `/proc/<pid>/stat` file parser
591
592
593              --proc-pid-statm
594                     `/proc/<pid>/statm` file parser
595
596
597              --proc-pid-status
598                     `/proc/<pid>/status` file parser
599
600
601              --ps   `ps` command parser
602
603
604              --resolve-conf
605                     `/etc/resolve.conf` file parser
606
607
608              --route
609                     `route` command parser
610
611
612              --rpm-qi
613                     `rpm -qi` command parser
614
615
616              --rsync
617                     `rsync` command parser
618
619
620              --rsync-s
621                     `rsync` command streaming parser
622
623
624              --semver
625                     Semantic Version string parser
626
627
628              --sfdisk
629                     `sfdisk` command parser
630
631
632              --shadow
633                     `/etc/shadow` file parser
634
635
636              --srt  SRT file parser
637
638
639              --ss   `ss` command parser
640
641
642              --ssh-conf
643                     `ssh` config file and `ssh -G` command parser
644
645
646              --sshd-conf
647                     `sshd` config file and `sshd -T` command parser
648
649
650              --stat `stat` command parser
651
652
653              --stat-s
654                     `stat` command streaming parser
655
656
657              --sysctl
658                     `sysctl` command parser
659
660
661              --syslog
662                     Syslog RFC 5424 string parser
663
664
665              --syslog-s
666                     Syslog RFC 5424 string streaming parser
667
668
669              --syslog-bsd
670                     Syslog RFC 3164 string parser
671
672
673              --syslog-bsd-s
674                     Syslog RFC 3164 string streaming parser
675
676
677              --systemctl
678                     `systemctl` command parser
679
680
681              --systemctl-lj
682                     `systemctl list-jobs` command parser
683
684
685              --systemctl-ls
686                     `systemctl list-sockets` command parser
687
688
689              --systemctl-luf
690                     `systemctl list-unit-files` command parser
691
692
693              --systeminfo
694                     `systeminfo` command parser
695
696
697              --time `/usr/bin/time` command parser
698
699
700              --timedatectl
701                     `timedatectl status` command parser
702
703
704              --timestamp
705                     Unix Epoch Timestamp string parser
706
707
708              --toml TOML file parser
709
710
711              --top  `top -b` command parser
712
713
714              --top-s
715                     `top -b` command streaming parser
716
717
718              --tracepath
719                     `tracepath` and `tracepath6` command parser
720
721
722              --traceroute
723                     `traceroute` and `traceroute6` command parser
724
725
726              --udevadm
727                     `udevadm info` command parser
728
729
730              --ufw  `ufw status` command parser
731
732
733              --ufw-appinfo
734                     `ufw app info [application]` command parser
735
736
737              --uname
738                     `uname -a` command parser
739
740
741              --update-alt-gs
742                     `update-alternatives --get-selections` command parser
743
744
745              --update-alt-q
746                     `update-alternatives --query` command parser
747
748
749              --upower
750                     `upower` command parser
751
752
753              --uptime
754                     `uptime` command parser
755
756
757              --url  URL string parser
758
759
760              --ver  Version string parser
761
762
763              --veracrypt
764                     `veracrypt` command parser
765
766
767              --vmstat
768                     `vmstat` command parser
769
770
771              --vmstat-s
772                     `vmstat` command streaming parser
773
774
775              --w    `w` command parser
776
777
778              --wc   `wc` command parser
779
780
781              --who  `who` command parser
782
783
784              --x509-cert
785                     X.509 PEM and DER certificate file parser
786
787
788              --x509-csr
789                     X.509 PEM and DER certificate request file parser
790
791
792              --xml  XML file parser
793
794
795              --xrandr
796                     `xrandr` command parser
797
798
799              --yaml YAML file parser
800
801
802              --zipinfo
803                     `zipinfo` command parser
804
805
806              --zpool-iostat
807                     `zpool iostat` command parser
808
809
810              --zpool-status
811                     `zpool status` command parser
812
813
814
815       Options:
816
817
818              -a, --about
819                     About jc (JSON or YAML output)
820
821              -C, --force-color
822                     Force color output even when using  pipes  (overrides  -m
823                     and the NO_COLOR env variable)
824
825              -d, --debug
826                     Debug - show traceback (use -dd for verbose traceback)
827
828              -h, --help
829                     Help (--help --parser_name for parser documentation). Use
830                     twice to show hidden parsers (e.g. -hh)
831
832              -m, --monochrome
833                     Monochrome output
834
835              -M, --meta-out
836                     Add metadata to output including timestamp, parser  name,
837                     magic command, magic command exit code, etc.
838
839              -p, --pretty
840                     Pretty print output
841
842              -q, --quiet
843                     Quiet  mode.  Suppresses parser warning messages (use -qq
844                     to ignore streaming parser errors)
845
846              -r, --raw
847                     Raw output. Provides more literal output, typically  with
848                     string values and no additional semantic processing
849
850              -u, --unbuffer
851                     Unbuffer  output  (useful  for  slow  streaming data with
852                     streaming parsers)
853
854              -v, --version
855                     Version information
856
857              -y, --yaml-out
858                     YAML output
859
860              -B, --bash-comp
861                     Generate Bash shell completion script
862
863              -Z, --zsh-comp
864                     Generate Zsh shell completion script
865
866
867       Slice:
868              Line slicing is supported using the START:STOP syntax similar to
869              Python  slicing.  This allows you to skip lines at the beginning
870              and/or end of the STDIN input you would like jc to convert.
871
872              START and STOP can be positive or negative integers or blank and
873              allow  you  to specify how many lines to skip and how many lines
874              to process.  Positive and blank slices are the most memory effi‐
875              cient. Any negative integers in the slice will use more memory.
876
877              For  example,  to  skip the first and last line of the following
878              text, you could express the slice in a couple ways:
879
880                     $ cat table.txt
881                           ### We want to skip this header ###
882                               col1       col2
883                               foo        1
884                               bar        2
885                           ### We want to skip this footer ###
886                     $ cat table.txt | jc 1:-1 --asciitable
887                     [{"col1":"foo","col2":"1"},{"col1":"bar","col2":"2"}]
888                     $ cat table.txt | jc 1:4 --asciitable
889                     [{"col1":"foo","col2":"1"},{"col1":"bar","col2":"2"}]
890
891              In this example 1:-1 and 1:4 line slices provide the  same  out‐
892              put.
893
894              When  using positive integers the index location of STOP is non-
895              inclusive.  Positive slices count from the first line of the in‐
896              put  toward  the  end  starting at 0 as the first line. Negative
897              slices count from the last line toward the beginning starting at
898              -1  as the last line. This is also the way Python's slicing fea‐
899              ture works.
900
901              Here is a breakdown of line slice options:
902
903
904              START:STOP
905                     lines START through STOP - 1
906
907              START: lines START through the rest of the output
908
909              :STOP  lines from the beginning through STOP - 1
910
911              -START:STOP
912                     START lines from the end through STOP - 1
913
914              START:-STOP
915                     lines START through STOP lines from the end
916
917              -START:-STOP
918                     START lines from the end through STOP lines from the end
919
920              -START:
921                     START lines from the end through the rest of the output
922
923              :-STOP lines from the beginning through STOP lines from the end
924
925              :      all lines
926
927

EXIT CODES

929       Any fatal errors within jc will generate an exit code of 100, otherwise
930       the exit code will be 0.
931
932       When  using  the  "magic" syntax (e.g. jc ifconfig eth0), jc will store
933       the exit code of the program being parsed and add it  to  the  jc  exit
934       code.   This  way  it  is  easier to determine if an error was from the
935       parsed program or jc.
936
937       Consider the following examples using ifconfig:
938
939              ifconfig exit code = 0, jc exit code = 0, combined exit code = 0
940              (no errors)
941
942              ifconfig exit code = 1, jc exit code = 0, combined exit code = 1
943              (error in ifconfig)
944
945              ifconfig exit code = 0, jc exit code = 100, combined exit code =
946              100 (error in jc)
947
948              ifconfig exit code = 1, jc exit code = 100, combined exit code =
949              101 (error in both ifconfig and jc)
950
951       When using the "magic" syntax you can also retrieve the  exit  code  of
952       the  called program by using the --meta-out or -M option. This will ap‐
953       pend a _jc_meta object to the output that will include the  magic  com‐
954       mand information, including the exit code.
955
956       Here is an example with ping:
957              $ jc --meta-out -p ping -c2 192.168.1.252
958              {
959                "destination_ip": "192.168.1.252",
960                "data_bytes": 56,
961                "pattern": null,
962                "destination": "192.168.1.252",
963                "packets_transmitted": 2,
964                "packets_received": 0,
965                "packet_loss_percent": 100.0,
966                "duplicates": 0,
967                "responses": [
968                  {
969                    "type": "timeout",
970                    "icmp_seq": 0,
971                    "duplicate": false
972                  }
973                ],
974                "_jc_meta": {
975                  "parser": "ping",
976                  "timestamp": 1661357115.27949,
977                  "magic_command": [
978                    "ping",
979                    "-c2",
980                    "192.168.1.252"
981                  ],
982                  "magic_command_exit": 2
983                }
984              }
985              $ echo $?
986              2
987
988

ENVIRONMENT

990       Custom Colors
991
992       You  can  specify custom colors via the JC_COLORS environment variable.
993       The JC_COLORS environment variable takes four  comma  separated  string
994       values in the following format:
995
996       JC_COLORS=<keyname_color>,<keyword_color>,<number_color>,<string_color>
997
998       Where colors are: black, red, green, yellow, blue, magenta, cyan, gray,
999       brightblack, brightred, brightgreen, brightyellow, brightblue,  bright‐
1000       magenta, brightcyan, white, or default
1001
1002       For example, to set to the default colors:
1003
1004              JC_COLORS=blue,brightblack,magenta,green
1005
1006              or
1007
1008              JC_COLORS=default,default,default,default
1009
1010       Disable Color Output
1011
1012       You  can  set the NO_COLOR environment variable to any value to disable
1013       color output in jc. Note that using the -C option to force color output
1014       will override both the NO_COLOR environment variable and the -m option.
1015
1016

STREAMING PARSERS

1018       Most parsers load all of the data from STDIN, parse it, then output the
1019       entire JSON document serially. There are some streaming  parsers  (e.g.
1020       ls-s,  ping-s,  etc.)  that immediately start processing and outputting
1021       the data line-by-line as JSON Lines (aka NDJSON) while it is being  re‐
1022       ceived  from  STDIN. This can significantly reduce the amount of memory
1023       required to parse large amounts of command output (e.g. ls -lR  /)  and
1024       can  sometimes  process  the  data more quickly. Streaming parsers have
1025       slightly different behavior than standard parsers as outlined below.
1026
1027              Note: Streaming parsers cannot be used with the "magic" syntax
1028
1029       Ignoring Errors
1030
1031       You may want to ignore parsing  errors  when  using  streaming  parsers
1032       since  these  may be used in long-lived processing pipelines and errors
1033       can break the pipe. To ignore parsing errors, use the -qq  cli  option.
1034       This  will  add a _jc_meta object to the JSON output with a success at‐
1035       tribute. If success is true, then there  were  no  issues  parsing  the
1036       line. If success is false, then a parsing issue was found and error and
1037       line fields will be added to include a short error description and  the
1038       contents of the unparsable line, respectively:
1039
1040              Successfully parsed line with -qq option:
1041                     {
1042                       "command_data": "data",
1043                       "_jc_meta": {
1044                         "success": true
1045                       }
1046                     }
1047
1048              Unsuccessfully parsed line with -qq option:
1049                     {
1050                       "_jc_meta": {
1051                         "success": false,
1052                         "error": "error message",
1053                         "line": "original line data"
1054                       }
1055                     }
1056
1057       Unbuffering Output
1058
1059       Most  operating  systems  will  buffer  output that is being piped from
1060       process to process. The buffer is usually around 4KB. When viewing  the
1061       output  in the terminal the OS buffer is not engaged so output is imme‐
1062       diately displayed on the screen. When  piping  multiple  processes  to‐
1063       gether,  though, it may seem as if the output is hanging when the input
1064       data is very slow (e.g. ping):
1065
1066              $ ping 1.1.1.1 | jc --ping-s | jq
1067              <slow output>
1068
1069       This is because the OS engages the 4KB buffer between jc and jq in this
1070       example.  To display the data on the terminal in realtime, you can dis‐
1071       able the buffer with the -u (unbuffer) cli option:
1072
1073              $ ping 1.1.1.1 | jc --ping-s -u | jq
1074              {"type":"reply","pattern":null,"timestamp":null,"bytes":"64",...}
1075              {"type":"reply","pattern":null,"timestamp":null,"bytes":"64",...}
1076              etc...
1077
1078              Note: Unbuffered output can be slower for large data streams.
1079
1080

PARSER PLUGINS

1082       Parser plugins may be placed in a jc/jcparsers  folder  in  your  local
1083       "App data directory":
1084
1085              - Linux/unix: $HOME/.local/share/jc/jcparsers
1086              - macOS: $HOME/Library/Application Support/jc/jcparsers
1087              - Windows: $LOCALAPPDATA\jc\jc\jcparsers
1088
1089       Parser   plugins   are   standard   python   module   files.   Use  the
1090       jc/parsers/foo.py or jc/parsers/foo_s.py (streaming) parser as  a  tem‐
1091       plate  and simply place a .py file in the jcparsers subfolder.  Any de‐
1092       pendencies can be placed in the jc folder above jcparsers  and  can  be
1093       imported in the parser code.
1094
1095       Parser plugin filenames must be valid python module names and therefore
1096       must start with a letter and consist entirely of alphanumerics and  un‐
1097       derscores. Local plugins may override default parsers.
1098
1099       Note:  The  application  data  directory follows the XDG Base Directory
1100       Specification
1101
1102

CAVEATS

1104       Locale
1105
1106       For  best  results  set  the  locale  environment  variables  to  C  or
1107       en_US.UTF-8 by modifying the LC_ALL variable:
1108
1109              $ LC_ALL=C date | jc --date
1110
1111       You can also set the locale variables individually:
1112
1113              $ export LANG=C
1114
1115              $ export LC_NUMERIC=C
1116
1117       On  some older systems UTF-8 output will be downgraded to ASCII with \u
1118       escape sequences if the C locale does not support UTF-8 encoding.
1119
1120       Timezones
1121
1122       Some parsers have calculated epoch timestamp fields added to  the  out‐
1123       put.  Unless  a timestamp field name has a _utc suffix it is considered
1124       naive. (i.e.  based on the local timezone of the system the  jc  parser
1125       was run on).
1126
1127       If  a  UTC  timezone can be detected in the text of the command output,
1128       the timestamp will be timezone aware and have a _utc suffix on the  key
1129       name.   (e.g.  epoch_utc)  No  other  timezones are supported for aware
1130       timestamps.
1131
1132

EXAMPLES

1134       Standard Syntax:
1135              $ dig www.google.com | jc -p --dig
1136
1137              $ cat /proc/meminfo | jc --pretty --proc
1138
1139       Magic Syntax:
1140              $ jc --pretty dig www.google.com
1141
1142              $ jc --pretty /proc/meminfo
1143
1144       Line Slicing:
1145              $ cat file.csv | jc :101 --csv    # parse first 100 lines
1146
1147       For parser documentation:
1148              $ jc --help --dig
1149
1150       More Help:
1151              $ jc -hh          # show hidden parsers
1152
1153              $ jc -hhh         # list parsers by category tags
1154
1155

AUTHOR

1157       Kelly Brazil (kellyjonbrazil@gmail.com)
1158
1159       https://github.com/kellyjonbrazil/jc
1160
1161
1163       Copyright (c) 2019-2023 Kelly Brazil
1164
1165       License:  MIT License
1166
1167
1168
11691.23.6                            2023-10-23                             jc(1)
Impressum