Friday, 18 October 2019

linux - How to escape characters over SSH command in a Makefile

I am trying to reload nginx in a Docker container over an SSH command... This is what I have in my Makefile:


reload:
ssh me@x.x.x "docker kill -s HUP `$$(docker ps | grep nginx | awk '{print $$1}')`"

But the command isn't working... I get this error:


"docker kill" requires at least 1 argument.
See 'docker kill --help'.

Usage: docker kill [OPTIONS] CONTAINER [CONTAINER...]

Kill one or more running containers
make: *** [reload] Error 1

No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...