get /command syntax help - Protocols

This is a discussion on get /command syntax help - Protocols ; Hello folks, Desired Function: Display contents of remote file onscreen w/o saving it to local file Store contents of remote file into kermit macro or variable w/o saving to local file. I realize I could workaround this by creating a ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: get /command syntax help

  1. get /command syntax help

    Hello folks,

    Desired Function:

    Display contents of remote file onscreen w/o saving it to local file
    Store contents of remote file into kermit macro or variable w/o saving to
    local file.

    I realize I could workaround this by creating a temp file, but then I have
    to save/open/read/delete same and it really seems to be just a waste when
    the bytes are coming down the pipe and in
    a buffer anyway.

    Any help / examples appreciated!!!!


    Can't seem to figure out how to do this. It looked like the /command switch
    on the
    get command would be just what the doctor ordered, but I have unable to

    get the right syntax to do what I desire
    find any example using this syntax.

    Example:

    if I have a file named FILE , containing the string CONTENTS

    and I type:

    get /command FILE echo the file contains

    i would hope to see the line : the file contains CONTENTS,
    rather i see the line: the file contains




  2. Re: get /command syntax help

    On 2004-08-09, wrote:
    : Desired Function:
    :
    : Display contents of remote file onscreen w/o saving it to local file
    : Store contents of remote file into kermit macro or variable w/o saving to
    : local file.
    :
    REMOTE TYPE filename

    - Frank

  3. Re: get /command syntax help

    >"Frank da Cruz" wrote in message
    > REMOTE TYPE filename


    Thanks Frank, for the fast replay -- which answered the first goal, I
    started looking at the get /command switch when I couldn't figure out how to
    stuff the rtype output to a variable...
    -- rtype will display file contents ,
    SET QUIET ON gets rid of extraneous header/footer info but I still have to
    figure out how to stuff the filecontents into a macro or variable.

    I'm sure this is blindingly obvious to someone who has worked with the
    product for decades, but I have been unable to locate syntax which
    demonstrates the correct use of this.



  4. Re: get /command syntax help

    On 2004-08-10, wrote:
    :>"Frank da Cruz" wrote in message
    :> REMOTE TYPE filename
    :
    : Thanks Frank, for the fast replay -- which answered the first goal, I
    : started looking at the get /command switch when I couldn't figure out how to
    : stuff the rtype output to a variable...
    : -- rtype will display file contents ,
    : SET QUIET ON gets rid of extraneous header/footer info but I still have to
    : figure out how to stuff the filecontents into a macro or variable.
    :
    There is no OBVIOUS way to do this. Consider that a remote file might be
    gigabytes long.

    Still, there is a non-obvious way:

    def xx query kermit command(cat filename)
    do xx

    where "cat" is the command used on the other computer to display a file's
    contents (use "type" for most non-Unix systems). Defining a macro to do this
    and then executing the macro is a trick to suppress display of the file on the
    screen during download ("set quiet on" doesn't affect QUERY).

    The result is in the \v(query) variable, unless the file is too big to fit
    or it contains NUL bytes, in which case it will be truncated.

    - Frank

  5. Re: get /command syntax help

    Neat solution. I am perversely glad that it wasn't some simple switch I
    wasn't
    seeing in the documentation.




+ Reply to Thread