mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-13 01:20:24 +02:00
add key/value info to ini example
This commit is contained in:
27
README.md
27
README.md
@ -1242,7 +1242,7 @@ ifconfig | jc --ifconfig -p # or: jc -p ifconfig
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
### INI files
|
### INI and plain key/value pair files
|
||||||
```bash
|
```bash
|
||||||
cat example.ini
|
cat example.ini
|
||||||
```
|
```
|
||||||
@ -1281,6 +1281,31 @@ cat example.ini | jc --ini -p
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
```bash
|
||||||
|
cat keyvalue.txt
|
||||||
|
```
|
||||||
|
```
|
||||||
|
# this file contains key/value pairs
|
||||||
|
name = John Doe
|
||||||
|
address=555 California Drive
|
||||||
|
age: 34
|
||||||
|
; comments can include # or ;
|
||||||
|
# delimiter can be = or :
|
||||||
|
# quoted values have quotation marks stripped by default
|
||||||
|
# but can be preserved with the -r argument
|
||||||
|
occupation:"Engineer"
|
||||||
|
```
|
||||||
|
```bash
|
||||||
|
cat keyvalue.txt | jc --ini -p
|
||||||
|
```
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "John Doe",
|
||||||
|
"address": "555 California Drive",
|
||||||
|
"age": "34",
|
||||||
|
"occupation": "Engineer"
|
||||||
|
}
|
||||||
|
```
|
||||||
### iptables
|
### iptables
|
||||||
```bash
|
```bash
|
||||||
iptables --line-numbers -v -L -t nat | jc --iptables -p # or: jc -p iptables --line-numbers -v -L -t nat
|
iptables --line-numbers -v -L -t nat | jc --iptables -p # or: jc -p iptables --line-numbers -v -L -t nat
|
||||||
|
Reference in New Issue
Block a user