mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
update readme
This commit is contained in:
parent
4e7f50c927
commit
bea025fbe4
1 changed files with 20 additions and 0 deletions
20
README.md
20
README.md
|
@ -81,6 +81,26 @@ Yes, when you run locally you don't even need to use a code. When you run locall
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## Using *croc* in pipes
|
||||||
|
|
||||||
|
You can easily use *croc* in pipes when you need to send data through stdin or get data from stdout.
|
||||||
|
|
||||||
|
**Sender:**
|
||||||
|
|
||||||
|
```
|
||||||
|
$ cat some_file_or_folder | croc
|
||||||
|
```
|
||||||
|
|
||||||
|
In this case *croc* will automatically use the stdin data and send and assign a filename like "croc-stdin-123456789".
|
||||||
|
|
||||||
|
**Receiver:**
|
||||||
|
|
||||||
|
```
|
||||||
|
$ croc --code code-phrase --yes --stdout | more
|
||||||
|
```
|
||||||
|
|
||||||
|
Here the reciever specified the code (`--code`) so it will not be prompted, and also specified `--yes` so the file will be automatically accepted. The output goes to stdout when flagged with `--stdout`.
|
||||||
|
|
||||||
|
|
||||||
# Install
|
# Install
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue