9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a bash script on server that runs fine when run interactively and writes stderr output to a file.
However, when invoked through a 'expect' script run on Mac OS my laptop which does ssh to the server : generates the expected file, but file has no content. I suspect the stderr is getting... (1 Reply)
Discussion started by: sdudc
1 Replies
2. Shell Programming and Scripting
Hi,
i have one problem with this script:
-------------------------------
cat hostid_gathering
#!/bin/bash
cat /home/user1/ip_switch | while read LINE; do
echo $LINE
/home/user1/expect_script2
done
------------------------------
cat /home/user1/expect_script2
#!/usr/bin/expect... (6 Replies)
Discussion started by: elilmal
6 Replies
3. Shell Programming and Scripting
Hi,
I am using Solaris OS,
I want to handle an occasional expression in expect script while logging into a remote server with ssh.
In normal scenario the expected expression is as below,
spawn ssh $user@$ip
expect "assword:"
send "$password\r"
but in a condition when the remote server... (2 Replies)
Discussion started by: varunksharma87
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am confused between using here document and using expect for writing interactive shell scripts(like changing password ,FTP or doing su).
My questions are :
1)Why here documents cant change password from shell script.
2)Why we need to use expect for same?
3) Can Sourcing a script can do... (2 Replies)
Discussion started by: kailash19
2 Replies
5. Shell Programming and Scripting
hi all,
i have this script that accepts passwords automatically and its working in one host only. my problem is how will i use it if i need it to run in more than one host/server let say by using "for loop statement"
working :
spawn bundle linux -r hostname checkpath... (2 Replies)
Discussion started by: linuxgeek
2 Replies
6. Shell Programming and Scripting
Hi experts
I know the expect script can match the terminal output to run the the following cmd
I write a script with expect named "test", I want to run ten "test" with background running,
for ((i=1;i<=10;i++)
do
./test -n $i
done
I find all the output of test will print on one... (0 Replies)
Discussion started by: yanglei_fage
0 Replies
7. 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
8. Shell Programming and Scripting
Hi,
First, let me explain the issue I am trying to solve. We have a lot of expect scripts with the duplicated send/expect commands. So, I'd like to be able to extract the duplicated code into the common scripts that can be used by other scripts.
Below is my test where I am trying to call... (0 Replies)
Discussion started by: seva
0 Replies
9. Shell Programming and Scripting
Hello, I need a smart sed command that can take any of the following two as an input and give below mentioned output. As you can see, I am trying to convert some C code
INPUT:
struct abc_sample1 {
char myString;
UINT16 myValue1;
... (2 Replies)
Discussion started by: SiftinDotCom
2 Replies