Advertisement

05.08.2008 at 06:31AM PDT, ID: 23385944
[x]
Attachment Details

Ftp remote command

Asked by basirana in Linux, Unix Operating Systems, HP-UX Unix

Tags: HP, HP-UX, 11.23

Hi friends

I would like to run OS command from ftp>

I have a scenario where I need to run the command which will create a file on remote machine that need to be ftp to local machine.

I have two files

1. run.sh

2. get_file

command I want to run in ftp> is crontab -l > crontab.lst.

once I exit the ftp. I want to run crontab < crontab.lst on local machine.
All I am doing is coping crontab list from server to another server.

both machines are unix based one is CSH and another is SH.

ThanksStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
run.sh
======
 
cp get_file $HOME/.netrc
#
# change directory to data directory and get files using
#
cd ../data
ftp -v $FTPSERVER >> $FTPLOG
rm  $HOME/.netrc
 
 
get_file
========
 
machine servername
login target\\usrid
password usr$1234
macdef init
cd $HOME
get crontab.lst
quit
 
Loading Advertisement...
 
[+][-]05.08.2008 at 06:45AM PDT, ID: 21524605

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.08.2008 at 06:48AM PDT, ID: 21524631

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.08.2008 at 06:51AM PDT, ID: 21524659

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.08.2008 at 06:55AM PDT, ID: 21524684

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.08.2008 at 06:59AM PDT, ID: 21524724

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Linux, Unix Operating Systems, HP-UX Unix
Tags: HP, HP-UX, 11.23
Sign Up Now!
Solution Provided By: vojans
Participating Experts: 3
Solution Grade: A
 
 
[+][-]05.08.2008 at 06:59AM PDT, ID: 21524730

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.08.2008 at 09:07AM PDT, ID: 21525947

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.08.2008 at 12:15PM PDT, ID: 21527598

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628