open
for filesystem> open {flags} (filename) ...rest
--raw, -r
: open file as raw binaryfilename
: the filename to use...rest
: optional additional files to openinput | output |
---|---|
nothing | any |
string | any |
Open a file, with structure (based on file extension or SQLite database header)
>openmyfile.json
Open a file, as raw bytes
>openmyfile.json--raw
Open a file, using the input to get filename
>'myfile.txt'|open
Open a file, and decode it by the specified encoding
>openmyfile.txt--raw|decodeutf-8
Create a custom from
parser to open newline-delimited JSON files with open
>def"from ndjson" [] { from json-o };openmyfile.ndjson
Support to automatically parse files with an extension .xyz
can be provided by a from xyz
command in scope.
Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/open.html