in reply to TTY help

You talk about a tty, a file, and Windows. Is Windows the source, the destination, or both? Is the connection via tcp/ip, or a serial port? Expect is useful for situations where session interaction can vary substantially. There are telnet and ssh modules that don't require the 'arcane' knowledge of expect programming, if there is little or no exception/variable handling. You could also write a perl program that does everything locally, and simply execute it remotely. This could be one via a service, or via ssh/telnet and the command line.

Replies are listed 'Best First'.
Re^2: TTY help
by sweetj (Initiate) on Sep 17, 2008 at 12:42 UTC
    For right now I'm doing this on a windows box. It will be done on each machine pulling a script from itself, So its a stand alone computer that only works within itself. It doesn't interact with an outside source. I'm not very experienced with Perl so I'm not sure what other options there are. Here's what I started and the error: my $test open (X, "DOS command where I'm pulling from |"); $the_pass = <X>; close(X); print $the_pass (for now to verify we got the password) open $test ,"| lsnrctl "; (starts the listener) print $test "status\n"; (shows status) print $test "change_password\n"; (type 'change_passwrd') print $test "\n"; (prompts for old_pswd) and errors with SNL-00102: snlpsprom: not a tty connection and we cannot get any further. Its security w/in the oracle listener. The only example I could find on the web was using Expect. Normally (here we would hit enter, to leave it blank) print $test "$the_pass\n"; (wants new_pswd, it should atke the value from $the_pass which is holding the password and the same for the next line where it wants us to re-enter it) print $test "$the_pass\n"; print $test "exit"; Thanks.