Re: Multiple modes? throught one connection

From: Atro Tossavainen (
Date: 09/15/04

  • Next message: David Hutchins: "Re: scp to pipe"
    Date: Wed, 15 Sep 2004 16:54:34 +0300 (EEST)

    On Tue, 14 Sep 2004 09:31:49 -0700 (PDT), Mike Friedman wrote:

    > On Mon, 13 Sep 2004 at 10:09 (+1000), Tim Nelson wrote:
    >> Hi all. I often want to scp a file somewhere and then run it.
    > Well, something like this might work (I haven't actually tried it):
    > cat 'file' | ssh $Host 'cat > $File; chmod +x $File; $File'

    There is an UUoC ("ssh host command < file" is neater), but more
    importantly, this relies on the premise that "." would be a part of
    the remote PATH, which hopefully is not the case, and moreover, for
    an executable file with an identical name not to exist elsewhere in
    the PATH of the remote system (at least before ".", which should not
    be a part of the PATH, but if it does appear, should do so only as
    the very last item).

    Atro Tossavainen (Mr.)               / The Institute of Biotechnology at
    Systems Analyst, Techno-Amish &     / the University of Helsinki, Finland,
    +358-9-19158939  UNIX Dinosaur     / employs me, but my opinions are my own.
    < URL : http : / / www . helsinki . fi / %7E atossava / > NO FILE ATTACHMENTS

  • Next message: David Hutchins: "Re: scp to pipe"