11-19-2010
Though this sounds silly...Can i write expect script in Linux environment?
If so...will this work?
#!/bin/sh
server=ftpproxy
user_id=user
k123456@xxx.abcdef.com
password=password
dir=/abc/xyz/work
filename=1234.def.ghi.$$
cd $dir
spawn ftp $server
expect "username:"
# Send the username,
send "$user_id\r"
expect "password:"
# Send the password,
send "$password\r"
expect "ftp>"
# Switch to binary mode,
send "bin\r"
expect "ftp>"
# Turn off prompting.
send "prompt\r"
expect "ftp>"
# Get all the files
send "mget $filename\r"
expect "ftp>"
send "bye\r"
expect eof
Please let me know if i have to make any changes to the script.
Thanks in advance!!
10 More Discussions You Might Find Interesting
1. IP Networking
Hi,
I am involved in a project on Debian. One of my requirement is to route an IP packet in my application to a proxy server and receive the reply from the proxy server as an IP packet. My application handles data at the IP frame level. My application creates an IP packet(with all the necessary... (0 Replies)
Discussion started by: Rajesh_BK
0 Replies
2. Linux
I am having trouble connecting to the internet.
Details:
OpenSuse 11.1, Cable Modem, connected to Linksys Wireless N Router, hard line from router to ethernet port on my computer.
I checked network settings in YAST2, my ethernet is showing not connected. I have it set to start at boot, and... (4 Replies)
Discussion started by: stringzz
4 Replies
3. Shell Programming and Scripting
Hi,
Can someone help me on how to ftp to UNIX server from an another UNIX Server.
I tried the follwoing but it is not working.
ftp -n 10.10.0.1
quote user usrname
quote pass passwd
ls
Though ftp is starting it is not allowing me run command.....
it is asking to
Thanks in... (5 Replies)
Discussion started by: EmbedUX
5 Replies
4. UNIX for Advanced & Expert Users
Hi All,
can some one please help me to solve this issue, its urgent:confused:
We need to FTP a file form our Unix server to an external client FTP location.
I am trying to connect to the proxy server first and then use the below USER comment to connect to the external FTP server, and its working... (3 Replies)
Discussion started by: JesusJoseph
3 Replies
5. Red Hat
Hi all,
First of all i would like to say sorry to all for my english.
My name is Mastan. We have an proxy server have 2 lan cards. one is for public and another for private.
public ip: 182.72.141....
private ip: 192.168.0.0
So, the thing is i configure ftp server in my local for... (0 Replies)
Discussion started by: mastansaheb
0 Replies
6. Shell Programming and Scripting
Hi All,
I have a ftp link as "ftp://ftp1.xyz.org/abc_ike/". The same thing is opening fine when I use a browser. But I am not sure how to connect to the above link from console. I used the command
ftp ftp1.xyz.org
The above is not working. I am not getting any error it simply stands still.... (1 Reply)
Discussion started by: machomaddy
1 Replies
7. Solaris
Hi Everyone,
I am using solaris 10.I am facing a different problem here with tlsftp.I have intalled all steps for tlsftp and able to connect to the destination server from the source server.It worked for some days.But recently when i am connectin it is giving below error.I am... (0 Replies)
Discussion started by: muraliinfy04
0 Replies
8. Shell Programming and Scripting
Hi Friends
I have created a shell script to connect to a windows server. But the problem is while trying to run the script I am not getting any output. After running the script it is hanged and the prompt is not showing until if I press the ctrl+Z to break the script. I also tried using the FTP... (2 Replies)
Discussion started by: Kannannair
2 Replies
9. IP Networking
I need to configure a proxy on my local machine to use an upstream proxy (installed on another machine). The upstream proxy requires Digest/NTLM authorization. I want the local proxy to deal with the upstream proxy's authorization details and provides authorization free access to users that connect... (0 Replies)
Discussion started by: Russel
0 Replies
10. Ubuntu
Note: I originally posted this question on unix.stackexchange.com. But as my question was down-voted within an hour of asking, I came to the conclusion that perhaps I need to quit attempting to get help on StackExchange or that my inquiry is simply moronic. If anyone feels that my question is not... (7 Replies)
Discussion started by: AntumDeluge
7 Replies