[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: [LI] vsnl mail problem



L.V.Gandhi forced the electrons to say:
> I wanted to connect to vsnl mail server. I made a script as follows.
> telnet 202.54.6.35 110
>     USER lvgandhi
>     PASS *******

This just executes the lines as if they were shell commands - USER and
PASS may not exist on your system as commands.

What you need is a script that can give telnet input via its stdin. Maybe
that is not possible since telnet might not be taking i/p from stdin -
it is probably using one of the /dev/[tp]ty* entries. I tried a shell
here document, but it didn't work.

OK, what you need is a programming language like expect. See expect(1)
for details on how to program in it. There are a few simple examples in
the man page, which might be just what you are looking for.

Binand

-- 
#include <stdio.h>                                   | Binand Raj S.
char *p = "#include <stdio.h>%cchar *p = %c%s%c;     | This is a self-
int main(){printf(p,10,34,p,34,10);return 0;}%c";    | printing program.
int main(){printf(p,10,34,p,34,10);return 0;}        | Try it!!
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.