The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
why the below script is not working ., konankir Shell Programming and Scripting 14 03-27-2008 04:32 PM
bdf script not working !! kpatel786 Shell Programming and Scripting 3 11-16-2007 11:10 AM
Pls. Help my script not working as it should cocoabeauty1 Shell Programming and Scripting 1 07-28-2007 05:11 PM
Script not working as desired mhssatya Shell Programming and Scripting 39 08-23-2006 09:51 AM
Backspace Not Working in Script Atama Shell Programming and Scripting 4 04-26-2002 10:17 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-18-2006
rookie250 rookie250 is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 6
FTP script not working

hi

I have made d below ftp script but the last part of script ie. moving the files after transfer (to a location in the source server only) is not working for me.

Can anybody pls..help.in same..!!!


#######################################################
#!/bin/sh
ftp -n 10.209.13.11 <<END_SCRIPT
quote USER xyz
quote PASS xyz
bin
prompt
cd /test
put reports.zip reports.tmp
rename reports.tmp reports.zip
#quit
bye
#END_SCRIPT
#exit 0
echo Arun
mv -f /export/VSNL_RECS_logs/MUM_ILD/strsp/reports.zip /test_script/test/

exit 0
END_SCRIPT
#############################################################
  #2 (permalink)  
Old 12-18-2006
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,318
Please use the Search function of the forum, there are more than 10 variations of such script.
  #3 (permalink)  
Old 12-19-2006
inquirer's Avatar
inquirer inquirer is offline
Registered User
  
 

Join Date: Aug 2001
Posts: 79
Quote:
Originally Posted by rookie250
hi

I have made d below ftp script but the last part of script ie. moving the files after transfer (to a location in the source server only) is not working for me.

Can anybody pls..help.in same..!!!


#######################################################
#!/bin/sh
ftp -n 10.209.13.11 <<END_SCRIPT
quote USER xyz
quote PASS xyz
bin
prompt
cd /test
put reports.zip reports.tmp
rename reports.tmp reports.zip
#quit
bye
#END_SCRIPT
#exit 0
echo Arun
mv -f /export/VSNL_RECS_logs/MUM_ILD/strsp/reports.zip /test_script/test/

exit 0
END_SCRIPT
#############################################################
Code:
echo Arun
mv -f /export/VSNL_RECS_logs/MUM_ILD/strsp/reports.zip /test_script/test/
exit0
this part should be placed after the "END_SCRIPT" since you already exited from the ftp prompt.

it should be:

Code:
#######################################################
#!/bin/sh
ftp -n 10.209.13.11 <<END_SCRIPT 
quote USER xyz
quote PASS xyz
bin
prompt
cd /test
put reports.zip reports.tmp
rename reports.tmp reports.zip
bye
END_SCRIPT

echo Arun
mv -f /export/VSNL_RECS_logs/MUM_ILD/strsp/reports.zip /test_script/test/
exit 0

#############################################################
hope this helps

many thanks
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:06 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0