]> git.cworth.org Git - notmuch-wiki/blobdiff - remoteusage.mdwn
Changed remote-usage script to use bash printf to quote special chars.
[notmuch-wiki] / 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}
     }