home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / question / 15806 < prev    next >
Encoding:
Text File  |  1993-01-21  |  1.5 KB  |  47 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!spool.mu.edu!enterpoop.mit.edu!bloom-picayune.mit.edu!news.mit.edu!jdell
  3. From: jdell@nefertiti.mit.edu (John Ellithorpe)
  4. Subject: Re: Automatic ftp session
  5. In-Reply-To: jbowyer@cis.vutbr.cs's message of 21 Jan 93 12:24:37 GMT
  6. Message-ID: <JDELL.93Jan21115730@nefertiti.mit.edu>
  7. Sender: news@athena.mit.edu (News system)
  8. Nntp-Posting-Host: nefertiti.mit.edu
  9. Organization: Massachusetts Institute of Technology
  10. References: <35150@adm.brl.mil>
  11. Date: Thu, 21 Jan 1993 16:57:30 GMT
  12. Lines: 33
  13.  
  14. On 21 Jan 93 12:24:37 GMT, jbowyer@cis.vutbr.cs (Bowyer Jeff) said:
  15.  
  16. > I imagine the capability exists; therefore . . .
  17.  
  18. > Would someone please send me a sample shell program that ftp's to a
  19. > site and returns a directory listing or gets a file . . . without user
  20. > intervention.
  21.  
  22. > Thanks for your assistance.
  23.  
  24. How about this one.
  25.  
  26. #!/bin/csh -f
  27. ftp prep.ai.mit.edu <<EOD
  28. anonymous
  29. jdell@maggie.mit.edu
  30. cd /pub/gnu
  31. ls
  32. quit
  33. EOD
  34.  
  35. And just run the script and pipe the output to some file.
  36.  
  37. John
  38.  
  39. --
  40.  
  41. ===============================================================================
  42. John Ellithorpe                           | Internet: jdell@maggie.mit.edu
  43. Dept. of Physics, Rm 26-349               | Phone   : (617) 253-3074  Office
  44. Massachusetts Institute of Technology     |           (617) 253-3072  Lab
  45. Cambridge, MA  02139                      |           (617) 236-4910  Home
  46. ===============================================================================
  47.