Hacker News new | past | comments | ask | show | jobs | submit login

I think the point is to illustrate that you can pipe things into it. There exist programs that work on files, and work much worse or not at all on standard input; this example thus demonstrates more power.

(Though, alluded to below, the "-X PUT" may be totally superfluous.)




The pipe is into curl, has nothing to do with the website itself


The website must support the feature. With `--upload-file` curl sends the `Content-Length` header; with the pipe it doesn’t.


You can do that with pure pipes, without cat:

    foo < input
This replaces foo's stdin with a pipe reading from input.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: