I have a file on my windows XP PC for which I wrote a script to ftp it to a unix server(Sun 5.8).
I am looking to do a find and replace(all within my script) of a string in unix and then ftp it back to the windows.
This is what I have so far :
test_ftp.bat contents are :
###
C:
cd schema_compare
ftp -s:test_ftp.txt servername
###
test_ftp.txt contents are :
###
username
password
put TEST.txt
perl -e "s/myname/yourname/g;" -pi $(find TEST.txt)
get TEST.txt
bye
###
The file gets FTPed, and then I get the error:
ftp> perl -e "s/myname/yourname/g;" -pi $(find TEST.txt)
Invalid command.
Obviously, I cannot do A perl command in ftp prompt.
Does anyone have any idea as to how I can achieve what I am trying to do above ?
Thanks