Add column flag to count command

This commit is contained in:
Joseph T Lyons
2020-08-15 01:36:15 -04:00
committed by Andrés N. Robalino
parent 8fe269a3d8
commit c6588c661a
3 changed files with 57 additions and 13 deletions

View File

@ -1,6 +1,10 @@
# count
This command counts the number of rows in a table.
Obtain the row or column count of a table.
## Flags
* `-c`, `--column`: Calculate number of columns in table
## Examples
@ -32,14 +36,18 @@ This command counts the number of rows in a table.
────┴────────────────────┴──────┴──────────┴──────────────
```
By default, `count` will return the number of rows in a table
```shell
> ls | count
20
```
The `-c` flag will produce a count of the columns in the table
```shell
> ls | get name | count
20
> ls | count -c
4
```
```shell