How to escape evaluation statement in launch file?

asked 2018-02-07 17:12:22 -0500

seanarm gravatar image

I'm trying to have something like this in a launch file:

<arg name="astring" value="today the url is$(date +%Y%m%d)" />

I don't intend for the date expression to evaluate in the launch file. I've tried wrapping the entire string, and individual elements, in single quotes. I've also tried escaping the dollar sign with a backslash, or replacing it with the xml code for a dollar sign. None of this seems to work. How do I pass the contents of the arg's value as a string, no matter what's inside of it?

edit retag flag offensive close merge delete


The hacky solution is to split the string into two: "today the url is$" and "(date +%Y%m%d)".

lucasw gravatar image lucasw  ( 2018-02-07 18:58:43 -0500 )edit