Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipe data using standard streams #62

Closed
k80w opened this issue Apr 7, 2018 · 3 comments
Closed

Pipe data using standard streams #62

k80w opened this issue Apr 7, 2018 · 3 comments

Comments

@k80w
Copy link

k80w commented Apr 7, 2018

It would be very useful if croc could send data directly from stdin and receive to stdout

@schollz
Copy link
Owner

schollz commented Apr 13, 2018

@dnaf It's now possible to pipe with stdin/stdout.

You can send with stdin using:

echo "hello, world" | croc --send stdin --code 1-my-secret-code

And receive through stdout using:

croc --stdout --yes --code 1-my-secret-code > out

The --yes is not necessary, but it is useful because otherwise you'll be prompted about whether you want to save the file. Also if you don't include the code you'll have to enter the prompt for that too.

@sabhiram
Copy link

Couldn't we tease if there is data being sent via stdin and omit the --send stdin?

@schollz
Copy link
Owner

schollz commented Apr 14, 2018

@sabhiram I didn't think about that - there is a way!

Fixed now with 1c05c35. Syntax is now:

echo "hello, world" | croc --code 1-my-secret-code

And receive through stdout using:

croc --stdout --yes --code 1-my-secret-code > out

@schollz schollz closed this as completed Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants