2020-05-13 17:23:33 +00:00
|
|
|
# from ini
|
|
|
|
|
|
|
|
Converts ini data into table. Use this when nushell cannot determine the input file extension.
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
2020-06-23 18:21:47 +00:00
|
|
|
Let's say we have the following `.txt` file:
|
|
|
|
|
2020-05-13 17:23:33 +00:00
|
|
|
```shell
|
|
|
|
> open sample.txt
|
|
|
|
[SectionOne]
|
|
|
|
|
|
|
|
key = value
|
|
|
|
integer = 1234
|
|
|
|
string1 = 'Case 1'
|
|
|
|
```
|
|
|
|
|
2020-06-23 18:21:47 +00:00
|
|
|
This file is actually a ini file, but the file extension isn't `.ini`. That's okay, we can use the `from ini` command:
|
2020-05-13 17:23:33 +00:00
|
|
|
|
|
|
|
```shell
|
|
|
|
> open sample.txt | from ini | get SectionOne
|
|
|
|
━━━━━━━┯━━━━━━━━━┯━━━━━━━━━━
|
|
|
|
key │ integer │ string1
|
|
|
|
───────┼─────────┼──────────
|
|
|
|
value │ 1234 │ 'Case 1'
|
|
|
|
━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━
|
|
|
|
```
|