]> git.cworth.org Git - notmuch-wiki/commitdiff
Changed remote-usage script to use bash printf to quote special chars.
authorJesse Rosenthal <jrosenthal@jhu.edu>
Tue, 15 Mar 2011 14:18:34 +0000 (10:18 -0400)
committerJesse Rosenthal <jrosenthal@jhu.edu>
Tue, 15 Mar 2011 14:18:34 +0000 (10:18 -0400)
remoteusage.mdwn

index 0298dd99d10f5887ade19a71aeee55cbcb6df351..1ecd3aa4aed638b589561f19e021ec4a59b773c8 100644 (file)
@@ -81,7 +81,7 @@ be necessary in the furture.
         shift
         # we need to a little sanitizing of msg ids so the shell
         # doesn't mangle them
-        ARGS=`echo $@ | sed 's/[\\$\\*\\!]/\\\&/g'`
+        printf -v ARGS "%q " "$@"      
         $SSH_BIN $USER@$SSH_HOST $NOTMUCH_REMOTE_BIN ${CMD} ${ARGS}
     }