10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear All,
I have a requirement where I have to SFTP or SCP a file in a batch script. Unfortunately, the destination server setup is such that it doesn't allow for shell command line login. So, I am not able to set up SSH keys. My source server is having issues with Expect. So, unable to use... (5 Replies)
Discussion started by: ss112233
5 Replies
2. Shell Programming and Scripting
I have to send few gzipped files from local server to SFTP server.
My Server Info
Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise
Created a bash script and could able to send files to sftp, but i want to send email if transfer is successful.
... (1 Reply)
Discussion started by: krux_rap
1 Replies
3. Shell Programming and Scripting
Hi All,
I have the problem to run the commands in expect script from shell script.
Mentioned below is the shell and expect script.
##Shell Script##
cat bscfile.txt | while read line
do
NODE=$line
./expect.sh $line $NAME
done
line= 1st input
NAME=2nd input... (1 Reply)
Discussion started by: yadvinder_singh
1 Replies
4. Shell Programming and Scripting
I am attempting to utilize an expect script (that is called from a parent bash script) to perform a file transfer over sftp.
The script works except I cannot catch timeouts. I need to be able to tell in the parent bash script when the expect script has timed out, or completed successfully.
It... (3 Replies)
Discussion started by: thaller
3 Replies
5. Shell Programming and Scripting
How to automate sftp with out using expect script?
My batch file has the password but it is not taking. Please see below.
I want to use this sftp connection in a loop for pushing new files in a directory one at a time. Hence I can not use an expect script.
bash-2.05$... (5 Replies)
Discussion started by: Tuxidow
5 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
Hi Gurus,I am trying to automate SFTP using expect.I have written a script that logs into a few boxes(one after the other) and pulls a few files from them.The code:#!/bin/kshcat serverlist.conf|wc -l >> tmp #serverlist.conf contains the list of servers.tmp1=$tmpfor tmp1 in listdo while read... (3 Replies)
Discussion started by: Hari_Ganesh
3 Replies
8. Shell Programming and Scripting
This is my expect script .
set USERNAME
set PASSWD
set IP
set timeout 15
spawn telnet $IP
expect "login:"
send "$USERNAME\r"
expect "Password:"
send "$PASSWD\r"
expect "Password:"
send "$PASSWD\r"
expect "*\>"
send "show version\r"
expect "*\>"
send "quit\r"
ouput of it (0 Replies)
Discussion started by: robbiezr
0 Replies
9. Shell Programming and Scripting
Hi All,
Here is my Expect script, I don't get any error message when I run it. But the file never goes to other system? I also paste the output screen below.
When I run the script, the script runs so fast. But when I do it manually, it takes about 10 minutes for the file to transfer.
... (1 Reply)
Discussion started by: samnyc
1 Replies
10. Shell Programming and Scripting
HI Al,
I have written the following expect script:
#!/bin/ksh
#!/usr/local/bin/expect--
##echo "PLease enter the server name"
##read host
echo "please enter the instance"
read instance
set ##password to be entered right before the script is run##
##/usr/local/bin/expect<<-EOF
cat... (2 Replies)
Discussion started by: Segwar
2 Replies