How to run a script when i'm using FTP???


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to run a script when i'm using FTP???
# 8  
Old 04-03-2012
hi ygemici

what u want me to do wit dat script??
my question is once the ftp is successful and when i list it, I want to execute a particular script from it.

Thanks for ur help.

Plz if u can lemme no wat actu dat script does it would be gr8 SmilieSmilie

---------- Post updated at 07:23 PM ---------- Previous update was at 06:41 PM ----------

hi ygemici

thanks for that Smilie
but my doubt is hw do i run when m on ftp prompt??

plz cn u help me with the script u have written??

thanks for help Smilie
# 9  
Old 04-03-2012
Quote:
Originally Posted by nikhil jain
hi ygemici

what u want me to do wit dat script??
my question is once the ftp is successful and when i list it, I want to execute a particular script from it.

Thanks for ur help.

Plz if u can lemme no wat actu dat script does it would be gr8 SmilieSmilie

---------- Post updated at 07:23 PM ---------- Previous update was at 06:41 PM ----------

hi ygemici

thanks for that Smilie
but my doubt is hw do i run when m on ftp prompt??

plz cn u help me with the script u have written??

thanks for help Smilie
maybe try like this but what results you expect?
Code:
ftp>!cd /your/script/path
ftp>!./yourscript.sh

and you can do execute some commands direct in the remote ftp session but some ftp servers.(below is VsFTPd)
try list your ftp commands
Code:
ftp> help
Commands may be abbreviated.  Commands are:
!               cr           mdir       proxy           send
$               delete       mget       sendport        site
account         debug        mkdir      put             size
append          dir          mls        pwd             status
ascii           disconnect   mode       quit            struct
bell            form         modtime    quote           system
binary          get          mput       recv            sunique
bye             glob         newer      reget           tenex
case            hash         nmap       rstatus         trace
ccc             help         nlist      rhelp           type
cd              idle         ntrans     rename          user
cdup            image        open       reset           umask
chmod           lcd          passive    restart         verbose
clear           ls           private    rmdir           ?
close           macdef       prompt     runique
cprotect        mdelete      protect    safe

you must use the ssh for remote exectuion for security reasons.Smilie

regards
ygemici
# 10  
Old 04-03-2012
FTP is very simple and stupid. It transfers files. It is not a shell.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies

2. Shell Programming and Scripting

How to run a shell script on a remote host using ftp

Hi, is there a way I can run a shell script through ftp on a remote host? The remote host doesn't have ssh running so I can't use ssh. (7 Replies)
Discussion started by: mrskittles99
7 Replies

3. Shell Programming and Scripting

how to run an already made script run against a list of ip addresses solaris 8 question

how to run an already developed script run against a list of ip addresses solaris 8 question. the script goes away and check traffic information, for example check_GE-VLANStats-P3 1.1.1.1 and returns the results ok. how do I run this against an ip list? i.e a list of 30 ip addresses (26 Replies)
Discussion started by: llcooljatt
26 Replies

4. Windows & DOS: Issues & Discussions

to run shell script using FTP

Hi All, From FTP prompt, How to run Unix Shell scripts? Thanks in Advance, (1 Reply)
Discussion started by: HemaV
1 Replies

5. Shell Programming and Scripting

Getting script to run after ftp command

Hi I, essentially have two parts in my script. The first ftp's to server S10 and retrieves a batch of files. The second part does the crunching and arranging, They both work independently but when run all in sam script I cannoy get 2nd part to run, i.e. the cat, cut & sed. I think it may be... (10 Replies)
Discussion started by: rob171171
10 Replies

6. AIX

My script didn't run every run every minute at cronjob

In my cronjob, I would like to schedule my script.sh to run every minutes. I crontab -e and have in line below but it didn't seems to run at all. * * * * * script.sh When I run it manually, I can run it. Is that anything wrong with the above line? If I change it to something like below,... (4 Replies)
Discussion started by: ngaisteve1
4 Replies

7. Shell Programming and Scripting

FTP run from shell script gives slow transfer rates

Hey everybody, this is my first post so be gentle. I have two Sun 5220's running Solaris 10 that are directly connected with a cross-over cable at Gig. One of these boxes is my production Oracle server which generates a 50GB dump file every evening at 10:50. The other Solaris is a devolopment... (8 Replies)
Discussion started by: Countificus
8 Replies

8. UNIX for Advanced & Expert Users

script to be run after every FTP transfer

Hello everyone, we are running VSFtpd as FTP Server on Redhat AS 5. I would like to have a script to be run immediately after every FTP transfer. Is is possible (or with any other FTP Server?). I thought of writing a script to monitor if FTP transfer happening and run the required-script... (2 Replies)
Discussion started by: prvnrk
2 Replies

9. UNIX for Advanced & Expert Users

FTP taking ages to run.

Hi every one, We have HP UX server which normally loaded as avg load of 19-21. NOw when I try and do ftp to this server it takes ages to get the FTP prompt. I have seen this server loaded as max agv load of 35-40 tht time we never had such problems of FTP sessions. Now my new Unix admin... (1 Reply)
Discussion started by: nilesrex
1 Replies
Login or Register to Ask a Question