Question

I wrote a conder script for a job and use condor_submit to submit this job. Below is my script:

Executable=/bin/bash
Arguments=" -c "" command_to_run -d -f"" "

initialdir= /path/
output=/path/out
error=/path/err
log=/path/log
universe = vanilla 
Getenv = true
Queue

As seen above, the executable is bash and I use -c to pass the command as a string to bash. The job gets submitted fine, but I get the following error message in err output file:

command_to_run: -c: line 0: unexpected EOF while looking for matching `"'
command_to_run: -c: line 1: syntax error: unexpected end of file

This is simply bash complaining about unmatched double quotes. But double quotes look fine to me. I don't know what the problem is. It seems like it is a condor problem. Any ideas?

Was it helpful?

Solution

If you're just passing -c to bash then single quoting should be sufficient (unless you're trying to embed variables):

Arguments=" -c 'command_to_run -d -f' "
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top