A utility class to correctly quote arguments strings before handing over
to Condor.
The following Condor Quoting Rules are followed while quoting a String.
1) \' => '' e.g \'Test\' is converted to ''Test''
2) \" => "" e.g \"Test\" is converted to ""Test""
3) ' => ' if not enclosed in surrounding double quotes
e.g 'Test' is converted to 'Test'
4) ' => '' if enclosed in surrounding double quotes
e.g "'Test'" is converted to ''Test''
5) " => ' if not enclosed in surrounding single quotes
e.g Karan "Vahi" is converted to Karan 'Vahi'
6) " => "" if enclosed in surrounding single quotes.
e.g 'Karan "Vahi"' is converted to 'Karan ""Vahi""'.
7) * => * if enclosed in single or double quotes, the enclosed characters
are copied literally including \ (no escaping rules apply)
8) \\ => \ escaping rules apply if not enclosed in single or double quotes.
e.g \\\\ becomes \\, and \\\ throws error.
In order to pass \n etc in the arguments, either quote it or escape it.
for e.g in the DAX the following are valid ways to pass Karan\nVahi to the
as arguments
1) "Karan\nVahi"
2) 'Karan\nVahi'
3) Karan\\nVahi
In addition while writing out to the SubmitFile the whole argument String
should be in enclosing ". |