I get this error:
Unknown .netrc keyword $download
The script reads:
machine **.gov
login anonymous
password none
macdef download
cd some directory
quit
$ download
I get this error:
Unknown .netrc keyword $download
The script reads:
machine **.gov
login anonymous
password none
macdef download
cd some directory
quit
$ download
man 5 netrc
make no provision for macro call, only macro defintion.
way to solve :
ftp prep.ai.mit.edu <<EOF
$ download
EOF
with
.netrc
having login for prep.ai.mit.edu$ download
is actual call to macro defined in .netrc
man netrc
writes,
If a macro named
init
is defined, it is automatically executed as the last step in the auto-login process
It looks like this is what you need,
machine WHATEVER.gov
login anonymous
password none
macdef init
cd "/some/directory"
get …whatever…
quit