4 ms·
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 inp
by waterhouse 11y ago
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.)
- nmat 11y agoThe pipe is into curl, has nothing to do with the website itself
- hk__2 11y agoThe website must support the feature. With `--upload-file` curl sends the `Content-Length` header; with the pipe it doesn’t.
- cbd1984 11y agoYou can do that with pure pipes, without cat: foo < input This replaces foo's stdin with a pipe reading from input.