[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: something strange with rsh/ssh + bash/tcsh is happening. Please advise



>>>>> "Yaroslav" == Yaroslav Halchenko <debian@onerussian.com> writes:

    Yaroslav> rsh node19 '/bin/echo 1111; /bin/echo 123'
    Yaroslav> rsh node19 /bin/sh -c '/bin/echo 1111; /bin/echo 123'

I think the problem has already been explained.

The solutions appear to be:

* rsh node19 '/bin/echo 1111; /bin/echo 123'
(as running the shell inside the shell seems to be a dumb thing anyway)

* rsh node19 /bin/sh -c '"/bin/echo 1111; /bin/echo 123"'
(also works, but gets increasingly complex)

Also if you are curious try:

* rsh node19 '/bin/echo *; /bin/echo 123'
(the * will be expanded by the implicit shell at the remote end) 

* rsh node19 '/bin/echo 111 > /tmp/out; /bin/echo 123'
(the > will be take effect in the implicit shell at the remote end) 

Is there anyway you can disable this implicit shell, either with ssh
or rsh? I really don't like it. I would rather each parameter be
passed straight to the remote executable via exec without being parsed
by sh first. Then, if I want to use the shell, I can say so. I don't
like this business of the command line being parsed by two shells as
the default.
-- 
Brian May <bam@debian.org>



Reply to: