ssh-copy-id no newline bug
Gert Doering
gert at greenie.muc.de
Tue Mar 22 19:31:11 AEDT 2016
Hi,
On Tue, Mar 22, 2016 at 09:17:21AM +0100, Philip Hands wrote:
> The test gets the last character of the file, and puts it in quotes
> after removing new-lines -- which basically means that test fails if
> there's a newline there, or if the file's empty, since that gives you:
>
> [ "" ]
Thanks, I learned something new today - from "man test":
string True if string is not the null string.
... never really noticed this line in 20+ years of shell scripting :-)
To add some useful content - I've checked the oldest (and most exotic)
systems I have around, and both SCO Open Server 5.0 and AIX document
the same thing, so it should be truly portable.
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany gert at greenie.muc.de
fax: +49-89-35655025 gert at net.informatik.tu-muenchen.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 291 bytes
Desc: not available
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20160322/85dce298/attachment.bin>
More information about the openssh-unix-dev
mailing list