HP3000-L Archives

July 2002, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Lars Appel <[log in to unmask]>
Reply To:
Lars Appel <[log in to unmask]>
Date:
Mon, 8 Jul 2002 22:48:35 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
>Another option is to send a trigger file, via ftp or the smbclient ...

And yet another option is to use Java or Perl based telnet implementations
instead of the telnet.arpa.sys program. With Java or Perl you could control
the remote system by sending commands and reacting to the response(s).

Here is a tiny Java example that telnets into a 3000 to perform a LISTFILE
command, read and display the output and finally logoff with bye. Should be
reasonably easy to adjust it for talking to Unix or Windows...


// usage example:  java jListf 12.34.56.78 demo/not.webkit/secret @,2

class jListf {

  public static void main(String[] args) throws Exception {

    HostIO host = new HostIO();
    host.open(args[0]);
    host.answerTo("MPE/iX:", "hello "+args[1]);
    host.answerTo(":", "listfile "+args[2]);
    host.skipLines(1);  // the command echo
    while ( ! host.readln().equals(":")) {
      System.out.println(host.getLine());
    }
    host.pushBack();
    host.answerTo(":", "bye");
    host.skipUntilStartsWith("CPU=");
    host.close();

  }

}


PS: Let me know if you'd like a copy of the HostIO class / download URL.

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2