-
Read the buffer
Hi Everyone:
I am dialing into a remote system using C-Kermit 8.0.211, logging in,
and then issuing commands to receive data.
This works well in interactive mode and I receive data back to my
screen.
I need to automate this process and capture the data to a file.
Using a "kerbang" script, I issue the command to receive data but it
does not appear on my screen. I searched the "debug.log" file, and
found the data is going to a buffer.
How do I retrieve data from the buffer and save it to a file?
-
Re: Read the buffer
There are many opportunities here but I'll assume you are issuing a unix
like command
which will give some kind of list you want to capture.
The following should be the core after establishing connection:
log session /* open session log
to hold the data */
lineout ls /* send ls command
to remote host */
input 0 a-string-you-will-never-receive /* you can create your own never
comming string */*/
/* but trust me
you need this */
log session close /* close the session log
before it gets cluttered
You should find the command ls echoed plus
the output of ls
in the file session.log in your working directory.
Regards...Dan.
"Mike" <Michael.Urzen@noaa.gov> wrote in message
news:43185dc2.0502021125.3fa86bf1@posting.google.com...[color=blue]
> Hi Everyone:
>
> I am dialing into a remote system using C-Kermit 8.0.211, logging in,
> and then issuing commands to receive data.
> This works well in interactive mode and I receive data back to my
> screen.
>
> I need to automate this process and capture the data to a file.
> Using a "kerbang" script, I issue the command to receive data but it
> does not appear on my screen. I searched the "debug.log" file, and
> found the data is going to a buffer.
>
> How do I retrieve data from the buffer and save it to a file?[/color]
-
Re: Read the buffer
help func scrnstr
help func scrncury
help func scrncurx
you may also type kermit screen scrape in google, this will link you
to sample scripts.
"Mike" <Michael.Urzen@noaa.gov> wrote in message
news:43185dc2.0502021125.3fa86bf1@posting.google.com...[color=blue]
> Hi Everyone:
>
> I am dialing into a remote system using C-Kermit 8.0.211, logging in,
> and then issuing commands to receive data.
> This works well in interactive mode and I receive data back to my
> screen.
>
> I need to automate this process and capture the data to a file.
> Using a "kerbang" script, I issue the command to receive data but it
> does not appear on my screen. I searched the "debug.log" file, and
> found the data is going to a buffer.
>
> How do I retrieve data from the buffer and save it to a file?[/color]
-
Re: Read the buffer
Mike wrote:[color=blue]
> Hi Everyone:
>
> I am dialing into a remote system using C-Kermit 8.0.211, logging in,
> and then issuing commands to receive data.
> This works well in interactive mode and I receive data back to my
> screen.
>
> I need to automate this process and capture the data to a file.
> Using a "kerbang" script, I issue the command to receive data but it
> does not appear on my screen. I searched the "debug.log" file, and
> found the data is going to a buffer.
>
> How do I retrieve data from the buffer and save it to a file?[/color]
Go to [url]http://www.columbia.edu/kermit/ckscripts.html[/url]
There are examples of scripts that receive data line by line and write
it to a file (eg the internet script pop3) and just log all received
data (the logging scripts) and a screen-scraping script too.
--
Mark Sapiro msapiro at value net The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan