send command failed but file was sent? - Protocols

This is a discussion on send command failed but file was sent? - Protocols ; In the DELIVER script, a piece of the code, AUTODIAL if fail continue out kermit\13 input 10 > out receive\13 input 10 KERMIT READY pause 1 send \%1 if success break Each time the file was sent to the remote ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: send command failed but file was sent?

  1. send command failed but file was sent?

    In the DELIVER script, a piece of the code,

    AUTODIAL
    if fail continue
    out kermit\13
    input 10 >
    out receive\13
    input 10 KERMIT READY
    pause 1
    send \%1
    if success break

    Each time the file was sent to the remote host OK, and I can view the
    content of the file, but the if statement didn't break the loop.

    Another puzzle is that the remote shell always show up, even though I
    "set dial connect off".
    I got something like "# receive --- not found", since receive is not a
    shell command. But again, file is transfered.

    Thanks in advance!



    Jun


  2. Re: send command failed but file was sent?

    It turned out that the file being sent has problem. It's a shell script
    and was aborting the kermit send process at a point, I don't know why.


    Jun

    Jun Zhang wrote:
    > In the DELIVER script, a piece of the code,
    >
    > AUTODIAL
    > if fail continue
    > out kermit\13
    > input 10 >
    > out receive\13
    > input 10 KERMIT READY
    > pause 1
    > send \%1
    > if success break
    >
    > Each time the file was sent to the remote host OK, and I can view the
    > content of the file, but the if statement didn't break the loop.
    >
    > Another puzzle is that the remote shell always show up, even though I
    > "set dial connect off".
    > I got something like "# receive --- not found", since receive is not a
    > shell command. But again, file is transfered.
    >
    > Thanks in advance!
    >
    >
    >
    > Jun
    >



  3. Re: send command failed but file was sent?

    In article ,
    Jun Zhang wrote:
    : In the DELIVER script, a piece of the code,
    :
    : AUTODIAL
    : if fail continue
    : out kermit\13
    : input 10 >
    : out receive\13
    : input 10 KERMIT READY
    : pause 1
    : send \%1
    : if success break
    :
    : Each time the file was sent to the remote host OK, and I can view the
    : content of the file, but the if statement didn't break the loop.
    :
    This sequence is supposed to be inside a FOR loop. Is it?

    Maybe you made a typing error that changed the script in some way. Please
    proofread it. If you can't find any mistake, then send a copy of your
    entire script to kermit-support@columbia.edu.

    : Another puzzle is that the remote shell always show up, even though I
    : "set dial connect off".
    :
    I suspect the script just showing you its automated dialog with the shell.
    In that case, just add:

    set input echo off

    and you won't see the dialog.

    : I got something like "# receive --- not found", since receive is not a
    : shell command. But again, file is transfered.
    :
    Does the remote computer start a Kermit program when it is given a "kermit"
    command at its shell prompt? Does the remote Kermit's prompt end with ">"?

    Please read the scripting tutorial again. You have to make the script do
    exactly what your eyes, hands, and brain do when you perform the same task
    interactively.

    - Frank

  4. Re: send command failed but file was sent?

    Seems the RECEIVE command is not needed in the DELIVER script, or at
    least the OUT keyword in front of RECEIVE doesn't make sense.

    The remote shell prompt still come up, it doesn't hinder anything from
    being done, but is this normal while I have "set dial connect off" in
    effect?


    Jun

    Jun Zhang wrote:
    > In the DELIVER script, a piece of the code,
    >
    > AUTODIAL
    > if fail continue
    > out kermit\13
    > input 10 >
    > out receive\13
    > input 10 KERMIT READY
    > pause 1
    > send \%1
    > if success break
    >
    > Each time the file was sent to the remote host OK, and I can view the
    > content of the file, but the if statement didn't break the loop.
    >
    > Another puzzle is that the remote shell always show up, even though I
    > "set dial connect off".
    > I got something like "# receive --- not found", since receive is not a
    > shell command. But again, file is transfered.
    >
    > Thanks in advance!
    >
    >
    >
    > Jun
    >



  5. Re: send command failed but file was sent?

    In article ,
    Jun Zhang wrote:
    : Seems the RECEIVE command is not needed in the DELIVER script, or at
    : least the OUT keyword in front of RECEIVE doesn't make sense.
    :
    Again: your script has to do what you would do by hand and eye. If you
    want to start Kermit on the far end, you have to tell the script to
    send the characters "kermit" and a carriage return. Now, depending on
    which Kermit program is on the remote computer, it will give a prompt,
    such as "C-Kermit>". Then you would give it a command such as "receive".

    HOWEVER, it so happens that by default, your Kermit client also sends
    the string "kermit -r" (and a carriarge return) when you give it a send
    command, so as to try to start Kermit on the far end itself, in case you
    forgot to do that. That's why it seems to work by magic.

    But of course, this is effective only if the remote computer has a Kermit
    program that accepts "-r" as a command-line argument.

    Remember, a script simply mimics what you do by hand and eye. If the
    remote computer has different commands or prompts, you have to change the
    script to match.

    Almost all the questions you ask are answered in the documentation. As
    stated on the C-Kermit web page:

    http://www.columbia.edu/kermit/ckermit.html

    There is a printed manual, supplemented by several web pages.

    : The remote shell prompt still come up, it doesn't hinder anything from
    : being done, but is this normal while I have "set dial connect off" in
    : effect?
    :
    I don't know what you mean by the shell prompt still comes up. Are you
    merely viewing the dialog as it takes place automatically? Or is the
    shell prompt waiting for you to type something?

    If you are viewing the dialog as it takes place automatically, and you don't
    want to see it, tell the Kermit program that is executing the script to:

    set input echo off

    If the shell prompt waiting for you to type something, then you have somehow
    entered CONNECT mode, but I can't explain how you did that without seeing
    your script. However, I think all this should be clear in the documentation.

    - Frank

+ Reply to Thread