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.
The XPG4 version in /usr/xpg4/bin/tail can understand either syntax. I did not have Solaris 11 available to check. -tgc _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@xxxxxxxxxxx https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev