10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I have two scripts one is Expect and other is shell.
I want to merge Expect code in to Shell script so that i can run it using only one script. Can somebody help me out ?
Order to execute: Run Expect_install.sh first and then when installation completes run runTests.sh shell script.
... (1 Reply)
Discussion started by: ashish_neekhra
1 Replies
2. Shell Programming and Scripting
Shell Scipt: temp.sh
su - <$username>
expect pass.exp
Expect script: pass.exp
#!/usr/bin/expect -f
# Login
#######################
expect "Password: " send "<$password>\r"
it comes up with Password: but doesnt take password passed throguh file. (2 Replies)
Discussion started by: bhavesh.sapra
2 Replies
3. Programming
Hi,
Am very new to expect scripting..
Can You please suggest me how to call an expect script inside another expect script..
I tried with
spawn /usr/bin/ksh
send "expect main.exp\r"
expect $root_prompt
and
spawn /usr/bin/ksh
send "main.exp\r"
expect $root_prompt
Both... (1 Reply)
Discussion started by: Priya Amaresh
1 Replies
4. Shell Programming and Scripting
Hi all,
This is the first time i am using expect.
I am trying to call a function with in the shell script. The function will shh to a new server and will pass the password using expect and send. I need help in calling the fuction i am getting follaowing errors...
here the script
... (8 Replies)
Discussion started by: firestar
8 Replies
5. Shell Programming and Scripting
Hi All,
I have an Expect script which logs into Cisco switch, performs a show interface command. I want to read a file of ip addresses which will be passed to the expect script.
The script to read the file works, the expect script works on it's own but when i call the 'expect' script from the... (12 Replies)
Discussion started by: trinak96
12 Replies
6. Shell Programming and Scripting
Hi there,
I need some help regarding the execution of shell script from expect as the method I am trying is giving me error. I wrote an shell program which takes two arguments to telnet to a device and saves the output in a file. Following is the script.... (0 Replies)
Discussion started by: cyberparanoid
0 Replies
7. Shell Programming and Scripting
Hi,
Please share you experience and way out on below error:-->
#!/bin/bash -xv
FILE=login.txt
+ FILE=login.txt
CONNECT=sshlogin.exp
+ CONNECT=sshlogin.exp
SERVERNAME=$1
+ SERVERNAME=192.168.12.1
MyServer=""
+ MyServer=
MyUser=""
+ MyUser=
MyPassword=""
+ MyPassword=
exec 3<&0
+... (6 Replies)
Discussion started by: manish_1678
6 Replies
8. Shell Programming and Scripting
I have the code like this :
shell script continues ...
....
expect -c"
spawn telnet $ip
expect "login:"
send \"$usrname\r\"
expect "Password:"
send \"$passwd\r\"
expect "*\>"
send \"$cmdstr\r\"
... (1 Reply)
Discussion started by: robbiezr
1 Replies
9. Shell Programming and Scripting
I call a EXPECT script from my perl script with machine IP and a FIle. The script logins to the machine and exports the value. The values to be exported or stored in a file.
I have close to 10 machines and I have created 10 files and pass the corresponding files in command line, Now I could like... (4 Replies)
Discussion started by: ramkriz
4 Replies
10. Shell Programming and Scripting
I have a webpage that is in HTML and PHP. In PHP I have tried using exec, system, shell_exec and passthru functions to call an Expect Script file (temp.exp). This Expect file spawns a telnet session that uses "expect/send" commands to retrieve information from an environmental unit (not a normal... (0 Replies)
Discussion started by: CCUSmith
0 Replies