NetBSD-Users archive

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

Re: cu take not working?



Thank you, Uwe,

This was a much more indepth explanation
than I have seen anywhere else.

Interestingly, I tried putting a "#" as EOF
variable, putting it at the end of my file,
too, in order to escape any problem with EOF
characters, but somehow that did not work. I
do not exclude the possibility, though, that
somehow this has been reset or something. I
assumed ~take should stop immediately upon
encountering the #-character.

Anyway - the funny part is, these were two
identical NetBSD systems (dd'd a drive on the
other), and both were using as shell the
built-in sh.

From your mail I understand it is simply
best to have both versions of cu, for any
values of "does".

Kind regards,

Nino


-------- Original-Nachricht --------
> Datum: Wed, 10 Jun 2009 12:18:53 +0000 (UTC)
> Von: uwe%stderr.spb.ru@localhost
> An: netbsd-users%netbsd.org@localhost
> Betreff: 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

-- 
GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und Telefonanschluss
für nur 17,95 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02


Home | Main Index | Thread Index | Old Index