Skip to content

Escaping Quotes in Windows Clients

This section explains how to escape quotes when you are running ybload and ybunload tools on the Windows command line (cmd.exe) or in Windows PowerShell.

For example, consider the following option setting:

{"nullmarker":"00/00/0000"}

To specify this kind of setting in UNIX and Linux shells, such as sh and bash, you can use standard JSON wrapped in a pair of single quotes. For example, to specify the nullmarker setting for all date fields:

--date-field-options '{"nullmarker":"00/00/0000"}'

However, Windows platforms do not support single quotes on the command line, so the option must be wrapped in double quotes. Also, because the syntax already contains some double quotes, they must be escaped. Note that the rules for escaping double quotes are different for cmd.exe/.BAT files and Windows PowerShell. See the following examples.

If you are running interactively via cmd.exe or from a .BAT file:

--date-field-options "{"nullmarker":"00/00/0000"}"

The JSON in this example has a backslash character in front of all the double quote characters, and the whole string is wrapped in double quotes.

If you are running interactively via PowerShell:
:   ```
--date-field-options "{\""nullmarker\"":\""00/00/0000\""}"

For PowerShell, you have to place a backslash and a double quote in front of all the double quote characters.

Parent topic:ybload Command