forked from extern/nushell
Add column flag to count command
This commit is contained in:
committed by
Andrés N. Robalino
parent
8fe269a3d8
commit
c6588c661a
@ -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
|
||||
|
Reference in New Issue
Block a user