10 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
Hello all,
I've been trying to design a script which will help me transfer files from one unix box to another. Following is the code:
#!/usr/local/bin/expect
spawn /usr/bin/scp ms_cp5_daily.ksh userid@cat:/prod/env/ms.txt
set pass xxxxxx
expect {
password: {send "$pass\r";... (4 Replies)
Discussion started by: sethmj
4 Replies
3. Shell Programming and Scripting
Dear friends,
Could you please help me in writing a sample code to connect the remote system (through ssh) using expect in shell script.
Thanks in advance.. :-) (1 Reply)
Discussion started by: rajesh.tulluri
1 Replies
4. Shell Programming and Scripting
Hi All,
I have a expect script which is working for single server, but if i am trying to pass value of the variable inside expect, it is not working. Please see below :-
expect -c 'spawn ssh username@ip_address ; expect assword ; send "Password1\n" ; send "uptime \n" ; send "free -m \n" ;... (0 Replies)
Discussion started by: Renjesh
0 Replies
5. 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
6. Shell Programming and Scripting
Hi
I would like to know how to handle my script that expects an input when calling the script and the user doesn't enter anything, I need to re-direct to my helpfile.
Bascically here is my script:
#!/bin/bash
csvdir="/var/local/dsx/csv/general"
csvfile="$csvdir/$csvfile"... (3 Replies)
Discussion started by: ladyAnne
3 Replies
7. Shell Programming and Scripting
Hello gurus,
I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script.
i m looking for something like this
call 3.1;
If 3.1 = "complete" then
call 3.2;
if 3.2 = ''COMPlete" then
call 3.3;
else
exit
The... (1 Reply)
Discussion started by: shashi369
1 Replies
8. Shell Programming and Scripting
This is my shell script which calls an expect file, i am trying to find out server.log file sizes on various servers. But what should be correct way to do that, is there any way i can run a for loop inside the expect file which can take cat <filename> as input. I know for can be used in expect file... (1 Reply)
Discussion started by: tonan
1 Replies
9. 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
10. AIX
Hi,
Please give me the detailed Differences between writing Unix Shell script and AIX Shell Scripts. Thanks in advance..... (0 Replies)
Discussion started by: haroonec
0 Replies