Re: Question about ssh no login



On 28 Apr 2007 00:48:22 -0700, sk8terg1rl wrote:

sk8terg1rl@home:~/.ssh> cat test
ssh sk8terg1rl@xxxxxxxxxx << EOF
ls
exit
EOF

By the way, exactly what is "<< EOF" for? The above script still works
if I change either EOF to anything else (even non-matching) but stops
working if I remove the first EOF

That is a "here document" indicator and they need to match.
http://www.tldp.org/LDP/abs/html/here-docs.html#HEREDOCREF

For extra points, read
http://www.tldp.org/LDP/abs/html/index.html
.



Relevant Pages

  • Re: [C} explanation needed for program behaviour
    ... > Instead you use the idiom: ... If it was because eof then ... > This also has the benefit, that the reading loop not only stops ...
    (alt.comp.lang.learn.c-cpp)
  • Re: just got myself a copy of K&R...
    ... Jirka Klaue wrote: ... > your code is exactly the same as the code using EOF. ... well obviously EOF is not set to -1 because the program never stops, ... testing for ARRAY, to make sure I didn't input a value past the last ...
    (comp.lang.c)
  • Re: [opensuse] amavisd warning failure?
    ... EOF means End Of File, it means content stops. ... Actually, it is, because EOF is also an ascii character that indicates end ... It would be disaster if that caused an end-of-file ...
    (SuSE)
  • Re: just got myself a copy of K&R...
    ... Andy wrote: ... > well obviously EOF is not set to -1 because the program never stops, ... You don't need to know how EOF is defined, ... Jirka ...
    (comp.lang.c)
  • Re: just got myself a copy of K&R...
    ... >> your code is exactly the same as the code using EOF. ... > well obviously EOF is not set to -1 because the program never stops, ... usually is a way to "type EOF". ...
    (comp.lang.c)