2019-10-04 16:37:11 +02:00
|
|
|
# nth
|
|
|
|
|
2020-03-13 18:23:41 +01:00
|
|
|
This command returns the nth row of a table, starting from 0.
|
2019-10-04 16:37:11 +02:00
|
|
|
If the number given is less than 0 or more than the number of rows, nothing is returned.
|
|
|
|
|
2019-11-28 19:32:31 +01:00
|
|
|
### Usage
|
2019-10-04 16:37:11 +02:00
|
|
|
```shell
|
2019-11-28 19:32:31 +01:00
|
|
|
> [input-command] | nth <row number> ...args
|
2019-10-04 16:37:11 +02:00
|
|
|
```
|
2019-11-28 19:32:31 +01:00
|
|
|
### Parameters:
|
|
|
|
* `<row number>` the number of the row to return
|
|
|
|
* `args`: Optionally return more rows
|
2019-10-04 16:37:11 +02:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
```shell
|
|
|
|
> ls
|
|
|
|
━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━
|
2020-03-13 18:23:41 +01:00
|
|
|
# │ name │ type │ readonly │ size │ accessed │ modified
|
2019-10-04 16:37:11 +02:00
|
|
|
───┼────────────┼───────────┼──────────┼────────┼───────────────┼───────────────
|
2020-03-13 18:23:41 +01:00
|
|
|
0 │ Cargo.toml │ File │ │ 239 B │ 2 minutes ago │ 2 minutes ago
|
|
|
|
1 │ .git │ Directory │ │ 4.1 KB │ 2 minutes ago │ 2 minutes ago
|
|
|
|
2 │ .gitignore │ File │ │ 19 B │ 2 minutes ago │ 2 minutes ago
|
|
|
|
3 │ src │ Directory │ │ 4.1 KB │ 2 minutes ago │ 2 minutes ago
|
2019-10-04 16:37:11 +02:00
|
|
|
━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━
|
|
|
|
|
|
|
|
> ls | nth 0
|
2019-11-28 19:32:31 +01:00
|
|
|
━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━
|
2020-03-13 18:23:41 +01:00
|
|
|
# │ name │ type │ readonly │ size │ accessed │ modified
|
2019-11-28 19:32:31 +01:00
|
|
|
───┼────────────┼───────────┼──────────┼────────┼───────────────┼───────────────
|
2020-03-13 18:23:41 +01:00
|
|
|
0 │ Cargo.toml │ File │ │ 239 B │ 2 minutes ago │ 2 minutes ago
|
2019-11-28 19:32:31 +01:00
|
|
|
━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━
|
|
|
|
|
|
|
|
> ls | nth 0 2
|
|
|
|
━━━┯━━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━
|
2020-03-13 18:23:41 +01:00
|
|
|
# │ name │ type │ readonly │ size │ accessed │ modified
|
2019-11-28 19:32:31 +01:00
|
|
|
───┼────────────┼───────────┼──────────┼────────┼───────────────┼───────────────
|
2020-03-13 18:23:41 +01:00
|
|
|
0 │ Cargo.toml │ File │ │ 239 B │ 2 minutes ago │ 2 minutes ago
|
|
|
|
2 │ .gitignore │ File │ │ 19 B │ 2 minutes ago │ 2 minutes ago
|
2019-11-28 19:32:31 +01:00
|
|
|
━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━
|
2019-10-04 16:37:11 +02:00
|
|
|
|
|
|
|
> ls | nth 5
|
|
|
|
```
|