change ``bash headers to
``sh
This commit is contained in:
@@ -5,32 +5,32 @@ tags: [ "basics", "format", "json" ]
|
||||
|
||||
Put output into column.
|
||||
|
||||
```bash
|
||||
```sh
|
||||
du -h /etc/* | column
|
||||
```
|
||||
|
||||
Reformat file with an explicit separator (`-s`):
|
||||
|
||||
```bash
|
||||
```sh
|
||||
column -ts: /etc/passwd
|
||||
```
|
||||
|
||||
Give columns names (`-N`), so you can hide some (`-H`):
|
||||
|
||||
```bash
|
||||
```sh
|
||||
column -ts: -N User,PW,UID,GID,Description,Home,shell -H PW,GID /etc/passwd
|
||||
```
|
||||
|
||||
Reorder with `-O` (unspecified items remain):
|
||||
|
||||
|
||||
```bash
|
||||
```sh
|
||||
column -ts: -N User,PW,UID,GID,Description,Home,shell -H PW,GID -O User,Description,shell /etc/passwd
|
||||
```
|
||||
|
||||
Output to json format with `-J`:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
column -J -ts: -H PW,GID,shell -N User,PW,UID,GID,Description,Home,shell /etc/passwd
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user