2022-02-14 02:22:51 +00:00
|
|
|
---
|
|
|
|
title: open
|
|
|
|
layout: command
|
2022-03-04 12:10:09 +00:00
|
|
|
version: 0.59.1
|
2022-02-14 02:22:51 +00:00
|
|
|
---
|
2019-10-06 14:53:17 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Opens a file.
|
2019-10-06 14:53:17 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Signature
|
2019-10-06 14:53:17 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
```> open (filename) --raw```
|
2020-06-23 18:21:47 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Parameters
|
2020-06-23 18:21:47 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
- `filename`: the filename to use
|
|
|
|
- `--raw`: open file as raw binary
|
2019-10-06 14:53:17 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
Open a file, with structure (based on file extension)
|
2019-10-06 14:53:17 +00:00
|
|
|
```shell
|
2022-02-14 02:22:51 +00:00
|
|
|
> open myfile.json
|
2020-06-23 18:21:47 +00:00
|
|
|
```
|
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Open a file, as raw bytes
|
2020-06-23 18:21:47 +00:00
|
|
|
```shell
|
2022-02-14 02:22:51 +00:00
|
|
|
> open myfile.json --raw
|
2020-06-23 18:21:47 +00:00
|
|
|
```
|
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Open a file, using the input to get filename
|
2020-06-23 18:21:47 +00:00
|
|
|
```shell
|
2022-02-14 02:22:51 +00:00
|
|
|
> echo 'myfile.txt' | open
|
2020-06-23 18:21:47 +00:00
|
|
|
```
|