home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / shell / 3840 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.3 KB

  1. Path: sparky!uunet!mcsun!uknet!stl!robobar!ibmpcug!adrian
  2. From: adrian@ibmpcug.co.uk (Adrian Hall)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: Automating telnet
  5. Keywords: telnet, here documents, automatic login
  6. Message-ID: <Bu7E5q.64C@ibmpcug.co.uk>
  7. Date: 7 Sep 92 10:22:37 GMT
  8. References: <ellis.715831025@nova>
  9. Organization: The IBM PC User Group, UK.
  10. Lines: 27
  11.  
  12. In article <ellis.715831025@nova> ellis@nova.gmi.edu (Stew Ellis) writes:
  13. >
  14. >I am trying to write a shell script to login to a remote gopher program.
  15. >The gopher program runs at login for user gopher, with no passwd.
  16. >
  17. >I have seen scripts before that automated ftp or telnet login, but I cannot
  18. >find them.
  19. >
  20. >I would have thought that telnet would read a here document in an orderly
  21. >fashion so something like the following would work:
  22. >  telnet remote.host << EOF
  23. >  loginname
  24. >  EOF
  25. >
  26. >The man page for telnet is of no help on this.  I am probably missing
  27. >something obvious to someone, but it is not obvious to me. :(
  28.  
  29. I tend to use 'expect' for these sorts of tasks (they dont come along
  30. that often). Check out your local archive site for the sources.
  31.  
  32. Adrian.
  33.  
  34. -- 
  35. --------------------------------------------------------------------------
  36. Adrian Hall                    Connect Systems Manager
  37. adrian@ibmpcug.co.uk                The IBM PC User Group
  38. Tel: +44 81 863 1191                Harrow, London, UK
  39.