[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] condor_chirp - How to escape special characters in classads?

On 01/02/2012 09:29 AM, Felix Wolfheimer wrote:
I'm trying to use condor_chirp to set a job classad which contains a
lot of spaces quotes and stuff. I found out, that I can escape the
outer quotes and something like this:

I assume this is on Unix?

The value of a classad string attribute must be surrounded by double quotes. Otherwise, classads treats the value as a classad expression, and you get very different behavior than expected. So, you want the value in double quotes. Now, you can't just put it in double quotes as you'd like, because the shell eats them. You were on the right track by escaping the quotes from the shell, bu the problem there is that the shell treats the space as an argument separator, and the the condor_chirp command then sees the wrong number of arguments. So, try this:

condor_chirp set_job_attr MyAttributes '"A String with spaces"'