Artificial intelligent assistant

Specify pipe output position I want to do stuff like this: echo myserver:~/dir/2/ | rsync -r HERE /local/path/ I want the output redirected to a specified location in the command. The echo stuff goes "HERE". What's the easiest way to do this?

You can use `xargs` or exactly this requirement. You can use the `-I` as place-holder for the input received from the pipeline, do


echo "myserver:${HOME}/dir/2/" | xargs -I {} rsync -r "{}" /local/path/


(or) use `~` without double-quotes under which it does not expand to the `HOME` directory path.


echo myserver:~/dir/2/ | xargs -I {} rsync -r "{}" /local/path/

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy a4190464d79931a9f2d231660efc1a7f