01-22-2008
Use the search function of the forum to select an example that will match your needs, there are lots of topics on that subject. Also, you can use "autoexpect" to achieve the same, look at its man pages.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to write an expect script that trys to telnet, if telnet fails, trys to ssh to a remote network devices.
The script works fine until the following is received :
spawn telnet 10.3.2.24
Trying 10.3.2.24...
telnet: connect to address 10.3.2.24: Connection refused
10.3.2.24 is... (2 Replies)
Discussion started by: popeye
2 Replies
2. Shell Programming and Scripting
So here is what I am trying to do. I have a large # of switches and routers I am trying to log into. Unfortunately some have ssh only, some have telnet only. and some i have never logged into with ssh. I first want it to SSH, if i have never logged into the box it will ask for adding the ssh key. I... (0 Replies)
Discussion started by: ippy98
0 Replies
3. Shell Programming and Scripting
Ok, i don't know if anyone else here have had to deal with something like this before, but here's my situation.
I have about 1000+ servers I need to log into to do something.
What i need to do is to log into each server, go to a certain directory on each of the servers, copy the files that... (3 Replies)
Discussion started by: SkySmart
3 Replies
4. Shell Programming and Scripting
I am using Net::SSH::Expect to connect to the device(iLO) with SSH. After the $ssh->login() I'm able to view the prompt, but not able to send any coommands.
With the putty I can connect to the device and execute the commands without any issues.
Here is the sample script
my $ssh =... (0 Replies)
Discussion started by: hansini
0 Replies
5. Shell Programming and Scripting
I'm trying to write a script using expect. I'd like the script to execute several commands when the ssh succeeds and i want it to exit if the ssh fails. Does this require to define a time out for the ssh command so that if the prompt is back before this defined time the next commands are executed??... (2 Replies)
Discussion started by: Hossam_Nox
2 Replies
6. Shell Programming and Scripting
Hi folks,
What I want to do is to check if there is an instance of running vlc on a remote server, then kill it, and start it again. The code I came up with is:
#!/bin/bash
expectFcn() {
expect -c "
set timeout -1
spawn ssh \"$1@$2\" \"$4\"
match_max 100000
expect {
-re... (2 Replies)
Discussion started by: dukevn
2 Replies
7. Shell Programming and Scripting
How would I write an expect script to automate ssh and what file extention do expect files use? (11 Replies)
Discussion started by: Prodiga1
11 Replies
8. Shell Programming and Scripting
(Crossposting note: I have already posted this article on comp.lang.tcl 6 days ago and on the tek-tips dot com forum 3 days ago. This is posted here again, because I didn't get any response on my original articles there).
I use the following script on Solaris to log into a remote host:
... (3 Replies)
Discussion started by: rovf
3 Replies
9. Shell Programming and Scripting
Hi all,
I want to connect to some host with "ssh". I have googled and got some commands of "expect" and "spawn". I was not aware of these commands and tried below script.
$ cat auto.sh
set host xx.xx.xx.xx
set password abcd@1234
set user root
spawn ssh $user@$host
expect "*?assword:*"... (4 Replies)
Discussion started by: divya bandipotu
4 Replies
10. Shell Programming and Scripting
I have write a script which contains
ssh -p 12345 dcplatform@10.125.42.50
ssh 127.0.0.1 -p 5555 "$CMD"
ssh root@$GUEST_IP "$CMD"
before I use public key, it works well, now I want to change to "expect", BUT I don't want to change above code and "parameter position"
I can post a... (1 Reply)
Discussion started by: yanglei_fage
1 Replies
LEARN ABOUT DEBIAN
tm::psi
TM::PSI(3pm) User Contributed Perl Documentation TM::PSI(3pm)
NAME
TM::PSI - Topic Maps, PSI (published subject identifiers)
DESCRIPTION
This package provides predefined subjects, all of which will be preloaded in every map which is instantiated with the TM package hierarchy.
When the subjects are defined also their relationship are kept here (example: isa is an instance of an assertion).
Every such subject is defined by its
item identifier
The internal identifier, which does not really mean much.
subject identifier
The subject indicator(s), which is ultimately the one which identifies any of the subjects here.
NOTE: For none of the subjects declared here a subject address exists. All concepts are TM-related concepts.
The subjects are sorted:
TMRM-related
These are the minimal subjects which make a map what it is. Examples are "isa" and its related role (type) "class" and "instance", and
"is-subclass-of" and its related roles.
TMDM-related (XTM things)
These are the additional concepts which are mandated by TMDM.
AsTMa-related
Here are more concepts which are needed by the AsTMa= language(s), such as "template" or "ontology".
TMQL-related
Here are more concepts which are needed by TMQL.
To learn about these predefined concepts, you can do one of the following
use TM::PSI;
warn Dumper ($TM::PSI::core, $TM::PSI::topicmaps_inc, $TM::PSI::astma_inc, $TM::PSI::tmql_inc);
Taxonometry
Two association types are predefined by the standard(s): "is-subclass-of" and "isa". Together with these roles are defined "subclass",
"superclass" and "instance", "class", respectively.
The TM::* suite of packages has these not only built in, but also works under the assumption that these association types and also the
roles CANNOT be subclassed themselves. This means that no map is allowed to use, say, "is-specialization-of" as a subclass of
"is-subclass-of". The costs of this constraint is quite small compared to the performance benefits.
Infrastructure Concepts
To make the whole machinery work, every topic map must contain infrastructure topics such as "name", "occurrence" etc. They are topics like
the topics a user may put into the map. While this is the right thing to do, in practical situation you often will want to filter out these
infrastructure topics. You can always get a list of these via
@@@ fix docu @@@@@
$tm->mids (keys %{$TM::PSI::topicmaps->{mid2iid}});
SEE ALSO
TM
AUTHOR INFORMATION
Copyright 200[1-68], Robert Barta <drrho@cpan.org>, All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://www.perl.com/perl/misc/Artistic.html
perl v5.10.1 2010-07-18 TM::PSI(3pm)