Better integration of cat_XMLResult.py with xargs
The OSG factory operators tend to use cat_XMLResult.py together with xargs.
entry_ls -fo CMS_T3_US_Omaha_tusker fecms 20121022 | xargs cat_XMLResult.py
The problem is:
If there are too many input files, xargs will call cat_XMLResult.py multiple time.
The result is an invalid XML output...
is printed out multiple time.
Jeff asked for a fix.
#1 Updated by Igor Sfiligoi about 8 years ago
- Status changed from New to Assigned
- One to disable the printout of the two offending lines.
The resulting output by itself will not be a valid XML file, but can easily be wrapped by the caller.
- One to treat single and multiple input files the same way.
Currently, cat_XML behaves in a different way if given a single vs multiple files.
#2 Updated by Igor Sfiligoi about 8 years ago
- Status changed from Assigned to Feedback
- Assignee changed from Igor Sfiligoi to Parag Mhashilkar
- % Done changed from 0 to 90
Implemented as options -raw and -forcemulti.
It was tested on the UCSD OSG gfactory and approved by Jeff.
Parag: Can you please have a quick look before I merge it into v2plus?
#4 Updated by Parag Mhashilkar about 8 years ago
- Assignee changed from Parag Mhashilkar to Igor Sfiligoi
Looks okay to me. Just one comment, you are doing a hard string comparison as below. Do you think there won't be any white spaces in the beginning of the line? If that's the case then feel free to merge.
if raw_out and (l[:2]=="<?"): [...] if l[:15]=="<OSGTestResult ":