How do I get kermit to return a code to a calling Linux Script ? - Protocols

This is a discussion on How do I get kermit to return a code to a calling Linux Script ? - Protocols ; I have the following line that I purposely triggered to try to simulate a timeout condition in my script: .. .. .. :1, echo PASSWORD PROMPT OK lineout xxxxxxxxx input 10 "#" if fail break stop 1 output \quit\13 .. ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: How do I get kermit to return a code to a calling Linux Script ?

  1. How do I get kermit to return a code to a calling Linux Script ?

    I have the following line that I purposely triggered to try to
    simulate a timeout condition in my script:
    ..
    ..
    ..
    :1, echo PASSWORD PROMPT OK
    lineout xxxxxxxxx
    input 10 "#"
    if fail break stop 1 output \quit\13
    ..
    ..
    ..
    }
    echo "Outside loop"
    bye
    exit

    I have a Linux script calling this Kermit script, but it doesn't seem
    to recognize the return code of a 1 from the stop command ?...I had to
    use the 'output \quit\13' because the stop was leaving me at the
    "C-Kermit>" prompt, I guess this is the correct syntax, because it put
    me back into my calling script.

  2. Re: How do I get kermit to return a code to a calling Linux Script ?

    In article ,
    newexpectuser wrote:
    : I have the following line that I purposely triggered to try to
    : simulate a timeout condition in my script:
    : .
    : .
    : .
    ::1, echo PASSWORD PROMPT OK
    : lineout xxxxxxxxx
    : input 10 "#"
    : if fail break stop 1 output \quit\13
    : .
    : .
    : .
    : }
    : echo "Outside loop"
    : bye
    : exit
    :
    : I have a Linux script calling this Kermit script, but it doesn't seem
    : to recognize the return code of a 1 from the stop command ?...I had to
    : use the 'output \quit\13' because the stop was leaving me at the
    : "C-Kermit>" prompt, I guess this is the correct syntax, because it put
    : me back into my calling script.
    :
    Please read about the END, STOP, and EXIT commands. Each does a different
    thing. From your description I think you need the EXIT command in this
    case.

    Also you are probably better off coding the entire procedure in Kermit,
    rather than trying to mix shell and Kermit scripts, at least if you want
    us to keep helping you with it. Yesterday you were complaining about a
    loop, but you failed to mention that the loop was in a shell script.
    Kermit does loops too. Please read the manual and other documentation:

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

    and look at the sample scripts:

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

    - Frank

+ Reply to Thread