From: Colin P. Mccabe Date: Fri, 9 Dec 2016 23:51:17 +0000 (-0800) Subject: dssh: handle quoted arguments better X-Git-Url: http://club.cc.cmu.edu/~cmccabe/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=116b91178d8d1629560d74aca99810657962b112;p=cmccabe-bin dssh: handle quoted arguments better --- diff --git a/dssh b/dssh index 14dd22c..9799ec0 100755 --- a/dssh +++ b/dssh @@ -48,7 +48,7 @@ shift $(expr $OPTIND - 1) if [ $# -eq 0 ]; then RUN_COMMAND="/bin/bash" else - RUN_COMMAND="${@}" + RUN_COMMAND="" fi which docker &>/dev/null || die "docker must be on the PATH." @@ -71,8 +71,8 @@ else fi if [ ${ALLOCATE_TTY} == 1 ]; then - docker exec -it "${DOCKER_IMAGE_ID}" ${RUN_COMMAND} + docker exec -it "${DOCKER_IMAGE_ID}" "${@}" ${RUN_COMMAND} else - docker exec -i "${DOCKER_IMAGE_ID}" ${RUN_COMMAND} & + docker exec -i "${DOCKER_IMAGE_ID}" "${@}" ${RUN_COMMAND} & wait fi