ssh-copy-id no newline bug

Philip Hands phil at hands.com
Wed Mar 23 08:32:43 AEDT 2016


"Tom G. Christensen" <tgc at jupiterrise.com> writes:

> On 22/03/16 08:34, Philip Hands wrote:
>>
>>    [ "`tail -c1 .ssh/authorized_keys 2>/dev/null`" ] && echo > .ssh/authorized_keys ;
>>
>> anyone know of portability issues with that?
>>
>
> On Solaris 10 and older /usr/bin/tail does not understand the -c1 
> syntax, it needs -1c instead.

OK, it seems that tail from coreutils on Debian can deal with -1c as
well -- odd -- is this actually the portable option despite not being in
the manual?

BTW can Solaris 10's tail handle it with a space after the c, thus:

   tail -c 1 

Cheers, Phil.
-- 
|)|  Philip Hands  [+44 (0)20 8530 9560]  HANDS.COM Ltd.
|-|  http://www.hands.com/    http://ftp.uk.debian.org/
|(|  Hugo-Klemm-Strasse 34,   21075 Hamburg,    GERMANY
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20160322/cc6afc3f/attachment.bin>


More information about the openssh-unix-dev mailing list