problem with ftp:

i have got 2 servers in unix(IBM AIX 5.3) namely below.

test1
production1

i m trying to do ftp from test1 to production1.
------------------------------------------------------------
below the script called naveed1.sh which lies in test1,also it have two files called

n1.txt----------->contains the username and password for login into production1.also what action i m performing in production1

ni_log.log-------->contains info abt ftp.
-----------------------------------------------------------------------
contents of naveed1.sh:

#!/bin/ksh

ftp -nv production1< test1/n1.txt > test1/ni_log.log

echo bye

--------------------------------------------------------------------
contents of n1.txt:

user gumian bull423

cd production1/AMIS_Scripts

cat rv1.sh | wc -l
-------------------------------------------------------

when i execute the script naveed1.sh it establishes the ftp but it fails in the part

cat rv1.sh | wc -l

till cd production1/AMIS_Scripts it works fine. can any one help me out.

-------------------------------------------------------------------

my requirement is to execute a script in test1 and then do ftp to production1 and then go to a particular dir and get the wc of a file called rv1.sh
-----------------------------------------------------------------------

below the contents of ni_log.log:

Connected to production1
220 production1 FTP server (Version 4.2 Tue Nov 14 12:49:19 CST 2006) ready.
331 Password required for gumian.
230-Last unsuccessful login: Tue Jul 8 06:45:34 2008 on ssh from 10.48.154.63
230-Last login: Wed Jul 9 04:24:28 2008 on ssh from 10.48.154.63
230 User gumian logged in.
250 CWD command successful.
?Invalid command
221 Goodbye.
--------------------------------------------------------------------

Hi,

You cannot use the cat command using the FTP session that is kinda obvious. Why dont you get the file, get the word count and delete it

basically i want to know how to execute any comand in ftp.

!(bang) works noly with few commands.also when i m giving

!wc rv1.sh it is returning value as 0.
-------------------------------------------------
it showing error wc: cannot open rv1.sh

how to basically use any type of command in ftp?