string logFile = generateTemporaryFileName("CCC-submitlog");
// define command to submit batch
- string subCommand = string("bash -l -c \"cd ") + workDir + "; ccc_msub " + fileNameToExecute + "_Batch.sh\"";
+ string subCommand = string("bash -l -c \\\"cd ") + workDir + "; ccc_msub " + fileNameToExecute + "_Batch.sh\\\"";
string command = _protocol.getExecCommand(subCommand, _hostname, _username);
command += " > ";
command += logFile;
iss >> ref;
// define command to delete batch
- string subCommand = string("bash -l -c \"ccc_mdel ") + iss.str() + string("\"");
+ string subCommand = string("bash -l -c \\\"ccc_mdel ") + iss.str() + string("\\\"");
string command = _protocol.getExecCommand(subCommand, _hostname, _username);
cerr << command.c_str() << endl;
status = system(command.c_str());
string logFile = generateTemporaryFileName(string("CCC-querylog-id") + jobid.getReference());
// define command to query batch
- string subCommand = string("bash -l -c \"bjobs ") + iss.str() + string("\"");
+ string subCommand = string("bash -l -c \\\"bjobs ") + iss.str() + string("\\\"");
string command = _protocol.getExecCommand(subCommand, _hostname, _username);
command += " > ";
command += logFile;
// if the argument contains spaces, we surround it with simple quotes (Linux)
// or double quotes (Windows)
if (commandArgs[i].find(' ') != string::npos) {
-#ifdef WIN32
commandStr += string("\"") + commandArgs[i] + "\"";
-#else
- commandStr += string("\'") + commandArgs[i] + "\'";
-#endif
} else {
commandStr += commandArgs[i];
}