On Sun, Aug 05, 2012 at 12:18:24PM +, Sean Estabrooks wrote:
> #!/bin/bash
> A="HELLO"
> B="WORLD"
> upgradecommand="echo $A $B \$SSH_CONNECTION; cat /etc/passwd; sleep 5"
> quoted=$(printf '%q' "$upgradecommand")
> tmux new-window -d -t mysession: -n window-remotehost "ssh remotehost
> ${quot
> Date: Sun, 5 Aug 2012 19:54:09 +0200
> From: deb...@jstimpfle.de
[...]
> Thank you Sean, I didn't know of %q (it actually isn't documented for my
> distribution). Can this be considered "safe"? (many shells out there,
> and I fear proper escaping is not