News for hackers. Stuff that matters.
Re:Command execution on Ansible controller from host by oskarth on Thursday January 12, 2017 @05:00AM (#13381119)
I prefer simple and portable shell scripts too. While I use here documents a bunch too this is the first time I've seen this idiom:

    #!/bin/sh
    tail -n +3 <current-filename> | ssh -p 1234 root@myserver_ip  ; exit
    set -eu
    ...
Clever.

When you write `install`, is this another script that you have installed on the server beforehand or is it a function/alias or something? [EDIT: Duh, didn't realize this was actually a standalone program (standard but non-POSIX AFAICT) I haven't used.]

Re:Command execution on Ansible controller from host by vog on Thursday January 12, 2017 @05:10AM (#13381155)
> While I use here documents a bunch too this is the first time I've seen this idiom

I came up with this trick to avoid nested here documents, which would make syntax highlighting unusable.

> When you write `install`, is this another script that you have installed on the server beforehand or is it a function/alias or something?

The "install" tool is very common on almost all Unix systems. It is usually called by a Makefile on "make install", but of course can be used by anyone.

Re:Command execution on Ansible controller from host by chelmertz on Thursday January 12, 2017 @05:12AM (#13381159)