Re: [ILUG] executing and calling macros from within a shell script

From: hrishy samant (hrishys at domain yahoo.co.uk)
Date: Tue 22 May 2001 - 10:13:07 IST


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

--- "John P. Looney" <john at domain antefacto.com> wrote: > On
Tue, May 22, 2001 at 07:52:05AM +0100, hrishy
> samant mentioned:
> > could anybody please provide with an example on
> how to
> > call an execute a macro from a shell script.
>
> What sort of Macro ? It's not a term usually used
> in Unix - do you mean
> an alias, or a shell function ?
>
> Kate
>
> --
> When I say 'free', I mean 'free': free from bond,
> of chain or command:
> to go where you will, even to Mordor, Saruman, if
> you desire. "
> -- Gandalf, paraphrasing the choice between Free
> and Non-free software
>
> --
> Irish Linux Users' Group: ilug at domain linux.ie
> http://www.linux.ie/mailman/listinfo/ilug for
> (un)subscription information.
> List maintainer: listmaster at domain linux.ie

____________________________________________________________
Do You Yahoo!?
Get your free at domain yahoo.co.uk address at http://mail.yahoo.co.uk
or your free at domain yahoo.ie address at http://mail.yahoo.ie



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:10:24 GMT