NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cu take not working?



Nino on NetBSD 4.0 <nbsdold%gmx.net@localhost> wrote:

> Apart from this, I tried cu mainly for one
> reason: it is part of the base system, so
> I hoped it would work best. (Well, it does
> not.)

Well, it does, for some values of "does", and so does Tailor UUCP
cu(1), for some other values of "does".


> This morning I discovered how to make it
> work though, and I think this also explains
> what is going wrong: when I say ~take file,
> it hangs indefinitely. However, when you
> press a few times wildly Ctrl-D (I guess
> that does the trick), Ctrl-C and Ctrl-X, it
> stops the transfer - which has been even
> quite successful. Just: The received file
> has two lines that the original does not
> have: an empty line and below it a shell
> prompt of the kind myhostname$.

What is your shell on the remote system?  Does it have line-editing
enabled?

The inherent problem with ~take is that it send the file contents
in-band.  Effectively it does 

    cat $filename; echo $eof_marker

where $filename is what you entered at the prompt.  The eof marker
traditionally used by cu(1) is ^A (i.e. '\01').  So if your remote
shell has line-editing that ^A gets interpreted by the shell command
line editor, the echo runs without arguments and so cu(1) never
receives the eof marker it expects.  Note, that as you are talking to
the remote terminal quoting is not going to help - shell doesn't even
get to see that ^A.

Tailor UUCP uses ////cuend//// as eof marker.


SY, Uwe
-- 
uwe%stderr.spb.ru@localhost                       |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen



Home | Main Index | Thread Index | Old Index