2019-10-06 16:53:17 +02:00
|
|
|
# open
|
|
|
|
|
|
|
|
Loads a file into a cell, convert it to table if possible (avoid by appending `--raw` flag)
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
```shell
|
|
|
|
> cat user.yaml
|
|
|
|
- Name: Peter
|
|
|
|
Age: 30
|
|
|
|
Telephone: 88204828
|
|
|
|
Country: Singapore
|
|
|
|
- Name: Michael
|
|
|
|
Age: 42
|
|
|
|
Telephone: 44002010
|
|
|
|
Country: Spain
|
|
|
|
- Name: Will
|
|
|
|
Age: 50
|
|
|
|
Telephone: 99521080
|
|
|
|
Country: Germany
|
2020-06-23 20:21:47 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```shell
|
2019-10-06 16:53:17 +02:00
|
|
|
> open user.yaml
|
|
|
|
━━━┯━━━━━━━━━┯━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━
|
|
|
|
# │ Name │ Age │ Telephone │ Country
|
|
|
|
───┼─────────┼─────┼───────────┼───────────
|
|
|
|
0 │ Peter │ 30 │ 88204828 │ Singapore
|
|
|
|
1 │ Michael │ 42 │ 44002010 │ Spain
|
|
|
|
2 │ Will │ 50 │ 99521080 │ Germany
|
|
|
|
━━━┷━━━━━━━━━┷━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━
|
2020-06-23 20:21:47 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```shell
|
2019-10-06 16:53:17 +02:00
|
|
|
> open user.yaml --raw
|
|
|
|
- Name: Peter
|
|
|
|
Age: 30
|
|
|
|
Telephone: 88204828
|
|
|
|
Country: Singapore
|
|
|
|
- Name: Michael
|
|
|
|
Age: 42
|
|
|
|
Telephone: 44002010
|
|
|
|
Country: Spain
|
|
|
|
- Name: Will
|
|
|
|
Age: 50
|
|
|
|
Telephone: 99521080
|
|
|
|
Country: Germany
|
|
|
|
```
|
|
|
|
|
|
|
|
```shell
|
|
|
|
> cat user.json
|
|
|
|
[
|
2020-06-23 20:21:47 +02:00
|
|
|
{
|
|
|
|
"Name": "Peter",
|
|
|
|
"Age": 30,
|
|
|
|
"Telephone": 88204828,
|
|
|
|
"Country": "Singapore"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"Name": "Michael",
|
|
|
|
"Age": 42,
|
|
|
|
"Telephone": 44002010,
|
|
|
|
"Country": "Spain"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"Name": "Will",
|
|
|
|
"Age": 50,
|
|
|
|
"Telephone": 99521080,
|
|
|
|
"Country": "Germany"
|
|
|
|
}
|
2019-10-06 16:53:17 +02:00
|
|
|
]
|
2020-06-23 20:21:47 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```shell
|
2019-10-06 16:53:17 +02:00
|
|
|
> open user.json
|
|
|
|
━━━┯━━━━━━━━━┯━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━━
|
|
|
|
# │ Name │ Age │ Telephone │ Country
|
|
|
|
───┼─────────┼─────┼───────────┼───────────
|
|
|
|
0 │ Peter │ 30 │ 88204828 │ Singapore
|
|
|
|
1 │ Michael │ 42 │ 44002010 │ Spain
|
|
|
|
2 │ Will │ 50 │ 99521080 │ Germany
|
|
|
|
━━━┷━━━━━━━━━┷━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━━
|
2020-06-23 20:21:47 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
```shell
|
2019-10-06 16:53:17 +02:00
|
|
|
> open user.json --raw
|
|
|
|
[
|
2020-06-23 20:21:47 +02:00
|
|
|
{
|
|
|
|
"Name": "Peter",
|
|
|
|
"Age": 30,
|
|
|
|
"Telephone": 88204828,
|
|
|
|
"Country": "Singapore"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"Name": "Michael",
|
|
|
|
"Age": 42,
|
|
|
|
"Telephone": 44002010,
|
|
|
|
"Country": "Spain"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"Name": "Will",
|
|
|
|
"Age": 50,
|
|
|
|
"Telephone": 99521080,
|
|
|
|
"Country": "Germany"
|
|
|
|
}
|
2019-10-06 16:53:17 +02:00
|
|
|
]
|
2020-06-23 20:21:47 +02:00
|
|
|
```
|