Re: ssh-copy-id no newline bug

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

 



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@xxxxxxxxxxxxxx
fax: +49-89-35655025                        gert@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Attachment: signature.asc
Description: PGP signature

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

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

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux