Feature: write to standard output for piping
It would be nice if one could rsync a single file from a remote host and write it to standard output, so that it could be used in a pipeline. Much like people often use curl.
I'd like to be able to do something like
rsync --write-to-stdout host:/path/to/file | process | process_some_more > output
The usual tricks like rsync host:/path/to/file /dev/fd/1 don't work either, because rsync insists on unlinking the destination if it is not a regular file, and aborts when it cannot. If it would just go ahead and write to the file anyway, this would just work.
Dirty proof-of-concept at https://github.com/neldredge/rsync/tree/stdout if anyone is interested, based on seeing what --write-devices does. Adds the --write-always option which attempts to make rsync always write to the given output file without deleting, no matter if it is regular or device or fifo or whatever. You can do
rsync --write-always --inplace --whole-file host:/path/to/file /dev/fd/1 | filter ...
and it works at least in simple tests.