From 30080c01659cf611666876b7b063b7b329822352 Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Mon, 21 Oct 2019 17:26:00 -0700 Subject: [PATCH] reorder parsers --- README.md | 70 +++++++++++++++++++++++++++---------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 000291d2..88f3d542 100755 --- a/README.md +++ b/README.md @@ -40,8 +40,8 @@ jc [parser] [options] `jc` accepts piped input from `STDIN` and outputs a JSON representation of the previous command's output to `STDOUT`. The JSON output can be compact or pretty formatted. Parsers: -- `--ls` enables the `ls` parser - `--ifconfig` enables the `ifconfig` parser +- `--ls` enables the `ls` parser - `--netstat` enables the `netstat` parser - `--ps` enables the `ps` parser - `--route` enables the `route` parser @@ -50,40 +50,6 @@ Options: - `-p` specifies whether to pretty format the JSON output ## Examples -### ls -``` -$ ls -l /bin | jc --ls -p -[ - { - "filename": "bash", - "flags": "-r-xr-xr-x", - "links": 1, - "owner": "root", - "group": "wheel", - "bytes": 618416, - "date": "May 3 22:26" - }, - { - "filename": "cat", - "flags": "-rwxr-xr-x", - "links": 1, - "owner": "root", - "group": "wheel", - "bytes": 23648, - "date": "May 3 22:26" - }, - { - "filename": "chmod", - "flags": "-rwxr-xr-x", - "links": 1, - "owner": "root", - "group": "wheel", - "bytes": 30016, - "date": "May 3 22:26" - }, - ... -] -``` ### ifconfig ``` $ ifconfig | jc --ifconfig -p @@ -168,6 +134,40 @@ $ ifconfig | jc --ifconfig -p } ] ``` +### ls +``` +$ ls -l /bin | jc --ls -p +[ + { + "filename": "bash", + "flags": "-r-xr-xr-x", + "links": 1, + "owner": "root", + "group": "wheel", + "bytes": 618416, + "date": "May 3 22:26" + }, + { + "filename": "cat", + "flags": "-rwxr-xr-x", + "links": 1, + "owner": "root", + "group": "wheel", + "bytes": 23648, + "date": "May 3 22:26" + }, + { + "filename": "chmod", + "flags": "-rwxr-xr-x", + "links": 1, + "owner": "root", + "group": "wheel", + "bytes": 30016, + "date": "May 3 22:26" + }, + ... +] +``` ### netstat ``` $ netstat -p | jc --netstat -p