macdef
macdef MacroName
defines a macro. The macro can be called in the ftp
client by prepending its name with a $
sign:
$ MacroName
Macros must be terminated with an empty line.
Macros apply to the most recent machine
statement seen.
Example .netrc
machine ftp.foobar.baz
login john
password 5ecr3t
macdef getmyfile # define a macro (here named 'getmyfile')
cd /abc/defghi/jklm # The macro can be executed in ftp client
get myFile.txt # by prepending macro name with $ sign
quit
macdef init # macro init is searched for when
binary # ftp connects to server.
machine other.server.org
login fred
password sunshine4ever