home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!gatech!darwin.sura.net!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!szatezal
- From: szatezal@magnus.acs.ohio-state.edu (Shane M Zatezalo)
- Subject: FTP - macros and macdef
- Message-ID: <1992Dec22.202855.20553@magnus.acs.ohio-state.edu>
- Summary: how to use a macro under FTP
- Keywords: FTP Macro Macdef
- Sender: news@magnus.acs.ohio-state.edu
- Nntp-Posting-Host: magnusug.magnus.acs.ohio-state.edu
- Organization: The Ohio State University
- Date: Tue, 22 Dec 1992 20:28:55 GMT
- Lines: 51
-
- I wanted to use a macro with FTP, so that if I created a user,
- and set his shell to "FTP $macroname"
- it would run that macro, and then exit that macro (when it was done)
- and log the user out.
-
- My question is this: how does one use macros with ftp?
-
- I looked at the man page, and it said this:
-
- $ macro-name [ args ]
- Execute the macro macro-name that was defined with the
- macdef command. Arguments are passed to the macro
- unglobbed.
-
- so I wrote a macro like this:
-
- bell
- ascii
- cd /tmp/ftp
- get it
- bye
-
- and then typed ftp $ftp.mac (the name of the file)
- but nothing happened. (it didn't work)
-
- Then I tried using the macdef command in ftp like this:
-
- ftp>macdef /tmp/ftp.mac
- bell
- ascii
- cd /tmp/ftp
- get it
- bye
- <control-d>
-
- But that didn't work either.
-
- What I want the user to be able to do is this: on login, he
- immediately is dropped into FTP so that he can GET one file
- from my system, and only that one file, and can't do anything
- else at all.
-
- Any help on this would be appreciated.
-
- Shane Zatezalo
-
- _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
- : Shane M. Zatezalo : i-net> szatezal@magnus.acs.ohio-state.edu :
- : CIS Eng Ohio State : NeXTMail> shane@kiwi.shws.ohio-state.edu :
- : ....call T.A.P. a Futurenet BBS 614-297-7031 16.8k DS HST 425 MEGS ... :
- :GS:::: Apple II forever!! ::::::GO BUCKS!::::::: Play Lacrosse! :::::::GS:
-