4.3.2 Escaping a command line for cloud service linkage information
When specifying symbol characters that must be escaped in a command line, the method for specifying escape characters differs depending on the OS. In JP1/AJS3 for Cloud Service Applications, by using the functionality described below, you can escape character strings according to the OS of the job execution host.
Use the following methods to specify escaping:
-
Specify in the form of "@CSA(character-string-to-escape)ASC@" by enclosing the portion of the command line that you want to escape with "@CSA(" (escape-start character) and ")ASC@" (escape-end character). For example, to escape the character string "a\a", specify "@CSA(a\a)ASC@".
-
The character-string-to-escape is specified as a variable, and is escaped by using the result of resolving the variable.
-
Characters from the escape-start character are ignored until the escape-end character appears.
The following shows how to escape in Windows and Linux.
<In Windows>
-
If the number of consecutive backslashes (\) before the quotation mark (") is n (one or more), set the number of backslashes (\) as 2 times n.
-
Replace the quotation mark (") with the symbol (\").
-
If the number of consecutive backslashes (\) at the end is n (one or more), set the number of backslashes (\) as 2 times n.
-
Enclose the entire character string that you want to escape with quotation marks (").
<In Linux>
-
Replace the backquote (`) with the symbol (\`).
-
If there is no apostrophe ('), enclose the entire character string that you want to escape with apostrophes (').
-
If the string contains apostrophes ('), change it by performing the following:
(1) Divide the value by using an apostrophe (').
(2) Replace the apostrophe (') with a backslash (\), and then enclose each of other divided character string with apostrophes (').
(3) Concatenate all character strings that were divided in (1) and edited in (2).