1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-15 01:24:29 +02:00

add documentation

This commit is contained in:
Kelly Brazil
2019-10-23 14:10:10 -07:00
parent 3db758764e
commit 649c0aa7c1
2 changed files with 76 additions and 1 deletions

View File

@ -65,6 +65,7 @@ jc [parser] [options]
- `--free` enables the `free` parser
- `--ifconfig` enables the `ifconfig` parser
- `--iptables` enables the `iptables` parser
- `--jobs` enables the `jobs` parser
- `--ls` enables the `ls` parser
- `--lsblk` enables the `lsblk` parser
- `--mount` enables the `mount` parser
@ -549,6 +550,44 @@ $ sudo iptables -vnL -t filter | jc --iptables -p
...
]
```
### jobs
```
$ jobs -l | jc --jobs -p
[
{
"job_number": 1,
"pid": 14798,
"status": "Running",
"command": "sleep 10000 &"
},
{
"job_number": 2,
"pid": 14799,
"status": "Running",
"command": "sleep 10001 &"
},
{
"job_number": 3,
"pid": 14800,
"status": "Running",
"command": "sleep 10002 &"
},
{
"job_number": 4,
"pid": 14814,
"history": "previous",
"status": "Running",
"command": "sleep 10003 &"
},
{
"job_number": 5,
"pid": 14815,
"history": "current",
"status": "Running",
"command": "sleep 10004 &"
}
]
```
### ls
```
$ ls -l /bin | jc --ls -p

View File

@ -3,9 +3,45 @@
Usage:
specify --jobs as the first argument if the piped input is coming from jobs
Also supports the -l option
Examples:
$ jobs -l | jc --jobs -p
[
{
"job_number": 1,
"pid": 14798,
"status": "Running",
"command": "sleep 10000 &"
},
{
"job_number": 2,
"pid": 14799,
"status": "Running",
"command": "sleep 10001 &"
},
{
"job_number": 3,
"pid": 14800,
"status": "Running",
"command": "sleep 10002 &"
},
{
"job_number": 4,
"pid": 14814,
"history": "previous",
"status": "Running",
"command": "sleep 10003 &"
},
{
"job_number": 5,
"pid": 14815,
"history": "current",
"status": "Running",
"command": "sleep 10004 &"
}
]
"""