cat
This command allows to get the contents of a BatchX file through stdout.
info
The cat command can be used with or without prepending bx:// to the path.
Usage
bx cat [--help] [-e=<end>] [-s=<start>] <path>
Parameters and inputs
- Parameters
- Inputs
| Shorthand | Long version | Description |
|---|---|---|
-s | --start | Offset (0-based) of the first byte to return (default: 0) |
-e | --end | Offset of the last byte to return (exclusive) (default: file length) |
--help | Show this help message and exit |
| Input | Description | Required |
|---|---|---|
<path> | File path | true |
Examples
Plain text file
Create a local file with the content "hello".
$ echo hello > hello.txt
Upload the file to BatchX using the bx cp command.
$ bx cp hello.txt bx://test/hello.txt
hello.txt [=================================================>] 100 %%
Print file content using the bx cat command.
$ bx cat bx://test/hello.txt
hello