Re: scp from stdin
On Thu, Nov 30, 2000 at 09:40:37AM +0000, Justin B Rye wrote:
...
> Well, try tempfile:
>
> $ tar cz ~user | ssh user@remotehost.com \
> 'umask 077 && OUT=$(tempfile -d ~/ -p out -s .tgz) && cat >$OUT'
Neat, finally a question simple enough for me to anwser and as a reward I
get to learn some neat thing too! Never used it before, so some reading up
to do (Oh how I love Debina GNU/Linux with all its docs:)...
nice nice seems safe, but...
Bypasses umask alltogether, and assumes TMPDIR is unset,
so nitpickingly we could do with:
$ tar cz ~user | ssh user@remotehost.com \
'unset TMPDIR && cat >$(tempfile -d ~/ -p out. -s .tgz)'
--
groetjes, carel
Reply to: