Quoting and Special Characters Rules for MaxL Shell

These rules are for MaxL Shell commands. Applicable MaxL Shell commands include Spool on/off, Echo, Shell Escape, and Nesting.

See Also

Quoting and Special Characters Rules for MaxL Language

Tokens enclosed in Single Quotation Marks

Tokens Enclosed in Double Quotation Marks

Use of Backslashes in MaxL

Use of Apostrophes (Single Quotation Marks)

Tokens enclosed in single quotation marks

Contents within single quotation marks are preserved as literal, without variable expansion.

Example: echo '$3';

Result: $3

Tokens enclosed in double quotation marks

Contents of double quotation marks are treated as a single token, and the contents are perceived as literal except that variables are expanded.

Example: spool on to "$ESSBASEPATH\\out.txt";

Result: MaxL Shell session is recorded to C:\Hyperion\products\Essbase\EssbaseServer\out.txt.

Example: spool on to "Ten o'clock.txt"

Result: MaxL Shell session is recorded to a file named Ten o'clock.txt

Use of apostrophes (single quotation marks)

Preserved if enclosed in double quotation marks. Otherwise, causes a syntax error.

Example: spool on to "Ten o'clock.txt"

Result: MaxL Shell session is recorded to a file named Ten o'clock.txt

Use of Backslashes

Backslashes must be enclosed in single or double quotation marks because they are special characters.

One backslash is treated as one backslash by the shell, but is ignored or treated as an escape character by MaxL. Two backslashes are treated as one backslash by the shell and MaxL.

'\ ' = \ (MaxL Shell) '\ ' = (nothing) (MaxL) '\\' = \\ (MaxL Shell) '\\' = \ (MaxL)

Example: spool on to 'D:\output.txt'

Result: MaxL Shell records output to D:\output.txt.

Example: spool on to 'D:\\output.txt'

Result: MaxL Shell records output to D:\output.txt.

Example: import database sample.basic lro from directory "$ARBORPATH\app\sample-basic-lros";

Result: Error. Import is a MaxL statement, and for MaxL, '\' is ignored.

Example: import database sample.basic lro from directory "$ARBORPATH\\app\\sample-basic-lros";

Result: MaxL imports LRO information to Sample Basic from $ARBORPATH\app\sample-basic-lros.