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.
--------------------------------------------------------------------