-
I'm running HP-UX.
Normally, when you ftp to a host, you are allowed to define a macro, using the macdef command, and execute it with arguments, preceding the macro name with a $.
But when i attempt to do the same thing from within a shell script, i run into problems.
ftp daytona <
prompt
macdef test
lcd $1
!pwd
cd $2
pwd
$ test /home/ksubrama/ftpsrc /home/kode/ftpdest
bye
endl
############### End of script ########################################
When i run this script, ( without the 'prompt', so that i can see the responses ), i find that $1 and $2 are not
substituted, but are taken as blank spaces.
If you could help me find out why, i'd be very grateful!!!
regrads
hrishy
-
try :
...
macdef test
lcd \$1
!pwd
cd \$2
pwd
...
the pb is that $1 and $2 are interpreted as env variables passed to the ftp command ...