diff --git a/docs/parsers/proc.md b/docs/parsers/proc.md index cbe255ca..f31b61ae 100644 --- a/docs/parsers/proc.md +++ b/docs/parsers/proc.md @@ -10,10 +10,16 @@ corresponding parser to perform the parsing. Magic syntax for converting `/proc` files is also supported by running `jc /proc/`. Any `jc` options must be specified before the -`/proc` path. +`/proc` path. The magic syntax supports "slurping" multiple files as input. +When multiple files are selected (e.g. `jc /proc/*/stat`) all of the output +will be wrapped inside an array. Also, a `_file` field will be included in +the output which helps correlate the input and output. The `--meta-out` +option can also be used to list the `/proc` input files for correlation with +the output list. -specific Proc file parsers can also be called directly, if desired and have -a naming convention of `proc-` (cli) or `proc_` (module). +Specific Proc file parsers can also be called directly, if desired, and have +a naming convention of `proc-` (cli) or `proc_` (module). To see +a list of Proc file parsers, use `jc -hh` or `jc -a`. Usage (cli): @@ -141,4 +147,6 @@ Compatibility: linux Source: [`jc/parsers/proc.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/proc.py) -Version 1.2 by Kelly Brazil (kellyjonbrazil@gmail.com) +This parser can be used with the `--slurp` command-line option. + +Version 1.3 by Kelly Brazil (kellyjonbrazil@gmail.com) diff --git a/jc/parsers/proc.py b/jc/parsers/proc.py index bfead608..630fffa5 100644 --- a/jc/parsers/proc.py +++ b/jc/parsers/proc.py @@ -5,10 +5,16 @@ corresponding parser to perform the parsing. Magic syntax for converting `/proc` files is also supported by running `jc /proc/`. Any `jc` options must be specified before the -`/proc` path. +`/proc` path. The magic syntax supports "slurping" multiple files as input. +When multiple files are selected (e.g. `jc /proc/*/stat`) all of the output +will be wrapped inside an array. Also, a `_file` field will be included in +the output which helps correlate the input and output. The `--meta-out` +option can also be used to list the `/proc` input files for correlation with +the output list. -specific Proc file parsers can also be called directly, if desired and have -a naming convention of `proc-` (cli) or `proc_` (module). +Specific Proc file parsers can also be called directly, if desired, and have +a naming convention of `proc-` (cli) or `proc_` (module). To see +a list of Proc file parsers, use `jc -hh` or `jc -a`. Usage (cli): diff --git a/man/jc.1 b/man/jc.1 index 65b2df27..d4001662 100644 --- a/man/jc.1 +++ b/man/jc.1 @@ -1,4 +1,4 @@ -.TH jc 1 2024-01-29 1.24.1 "JSON Convert" +.TH jc 1 2024-01-30 1.24.1 "JSON Convert" .SH NAME \fBjc\fP \- JSON Convert JSONifies the output of many CLI tools, file-types, and strings