Script should flow after ftp --Urgent


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Script should flow after ftp --Urgent
# 1  
Old 06-18-2008
Script should flow after ftp --Urgent

Hi everyone,

The script actually does the ftp and gets the file to the local system.
I want to do some manipulations for that file , But after doing ftp , script is not proceding and just a prompt is displayed .

....
ftp code here......
....................
...............
echo "FTP over"

Output is : home/dir11>

Required output : "Ftp over" something like that..


Can any one help....it's urgent to my script now.
# 2  
Old 06-18-2008
try this

#!/bin/sh
IP='127.0.0.1'
USERNAME='uname'
PASSWORD='pswd'

ftp -un $HOSTNAME <<EOF
quote USER $USERNAME
quote PASS $PASSWORD
ls
quit
EOF
echo "FTP over"
exit 0
# 3  
Old 06-19-2008
Thanks yaar....I will try
# 4  
Old 06-19-2008
it's not working.....saying -u : unknown option
# 5  
Old 06-20-2008
Hi everyone....

I got the solution but may not be the optimum one...

Wht I did was

Let A,B be two servers...

from A server telnet to B
and from there ftp'ed the file to A....

Telnet did not cause any harm in flow control .....Thus, flow was as expected even after the ftp....

plx ...post if you find any other solution

Thanks,
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

URGENT Reading a file and assessing the syntax shell script URGENT

I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies

2. Shell Programming and Scripting

Help with control flow in a Bash script

In my bash script I want to say "if argument 2 is anything except x, y or z, than echo this" (x y and z being words). So my script looks like this: if ] then echo "unrecognized input: $2" fi This usually works but than I also want to say "if argument 2 IS x, y, or z, but argument 4 is... (4 Replies)
Discussion started by: Jrodicon
4 Replies

3. Shell Programming and Scripting

Backup script using Korn Flow Control

I am wiping off the dust to my shell scipting days and had this question: I have this script that I have created, and cannot figure out where my flow control issue is within this script. #!/bin/ksh #Basic script to backup server #Home directories to the external ... (2 Replies)
Discussion started by: metallica1973
2 Replies

4. Shell Programming and Scripting

Help with make sure shell script execute instruction in flow

Hi, I want to write a shell script to make sure all the instruction is executive in flow. eg. I want my shell script to run finish this two progress first: ./program input_file_1.txt > input_file_1.txt.out & ./program input_file_2.txt > input_file_2.txt.out & After then, only run the... (1 Reply)
Discussion started by: edge_diners
1 Replies

5. Shell Programming and Scripting

Python script - control flow statements

Hi guys.I'm just beginner of python. I'm just trying to do some analysis on simple input file. it has 6 columns and i want to consider k,l and m,n if i and j are + after that checking which value is greater or lower in k,l and m,n I have included logic header just to explain what I was... (4 Replies)
Discussion started by: repinementer
4 Replies

6. Shell Programming and Scripting

ftp and telnet in the same script ?? Urgent Help !!

Hi All, I have written a script which ftp certain file to other machine and as the ftp completes , I want to connect to that machine ( at which the file is ftped) . Now the problem is that my script ftp's the file but it does not telnet to that machine. Suppose I am at machine1 and I want to... (11 Replies)
Discussion started by: aarora_98
11 Replies

7. UNIX for Advanced & Expert Users

FTP script urgent

Hi guys, Here is my requirement for ftp script that i have to automate in unix using shell script: 1) Find the files that atre created one week from the present day. 2) ftp them to the backup server. 3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies

8. Filesystems, Disks and Memory

Urgent FTP script automation

Hi guys, Here is my requirement for ftp script that i have to automate in unix using shell script: 1) Find the files that atre created one week from the present day. 2) ftp them to the backup server. 3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies

9. UNIX Desktop Questions & Answers

Urgent FTP script automation

Hi guys, Here is my requirement for ftp script that i have to automate in unix using shell script: 1) Find the files that atre created one week from the present day. 2) ftp them to the backup server. 3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies

10. UNIX for Dummies Questions & Answers

Urgent FTP script automation

Hi guys, Here is my requirement for ftp script that i have to automate in unix using shell script: 1) Find the files that atre created one week from the present day. 2) ftp them to the backup server. 3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies
Login or Register to Ask a Question