# Add space after LaTeX command

I'd like to call a command from LaTeX, which looks like this:

bash -c "\myCommand -Tpdf #2.dot > #2.pdf"

\myCommand is replaced by string variable, however the space after is also removed so I get something-Tpdf which is of course not understood by bash. How can I force LaTeX to leave a space in this string?

\myCommand{} doesn't help

-
We could do with a full MWE to see how you are setting this up: for example, usually \myCommand{} would work fine. –  Joseph Wright Feb 17 '12 at 16:35
\myCommand\space should work; but you should add some context to your question –  egreg Feb 17 '12 at 16:35
@Werner This might be in a \write18, if I understand correctly, so neither {} nor \xspace is the solution. –  egreg Feb 17 '12 at 16:48