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