Skip to content
Snippets Groups Projects
Commit 3c4f138b authored by Alexander van Amesfoort's avatar Alexander van Amesfoort
Browse files

Task #9939: Cobalt getOutputProcHosts: fix trailing space. When coverted to a...

Task #9939: Cobalt getOutputProcHosts: fix trailing space. When coverted to a ',', 'srun -w' can still deal with it, but other parts of our shell scripts do not like it
parent 0660b466
No related branches found
No related tags found
No related merge requests found
......@@ -71,11 +71,14 @@ int main(int argc, char **argv)
Parset ps(argv[optind]);
// Get the list of stations and output to stdout space separated
for (std::vector<string>::const_iterator host = ps.settings.outputProcHosts.begin();
host != ps.settings.outputProcHosts.end();
++host)
{
cout << *host << " ";
std::vector<string>::const_iterator host = ps.settings.outputProcHosts.begin();
if (host != ps.settings.outputProcHosts.end()) {
cout << *host;
++host;
for ( ; host != ps.settings.outputProcHosts.end(); ++host) {
cout << ' ' << *host;
}
}
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment