IBM Support

HMC CLI: How to Escape Commas in Attribute Values

Troubleshooting


Problem

Several HMC commands (CLI) use attribute/value pair mappings. This document describes how to properly escape values that include a comma.

Resolving The Problem

Several HMC commands (CLI) use attribute/value pair mappings. This document describes how to properly escape values that include a comma.

If you are supplying an LPAR name that contains a comma as an attribute value, you also need to add double quotation marks around the attribute/value pair

Example:
-i "\"lpar_name=abc,1\""
chsyscfg -m CS6520 -r lpar -i "name=No comma name,\"new_name=comma, name\""

If you are supplying an LPAR name that contains a comma as an attribute value for an attribute that accepts a list, you need to add three sets of double quotation marks around the LPAR name.

Example:
--filter "lpar_names=\"\"\"abc,1\"\"\"
chsyscfg -m CS6520 -r lpar --filter "lpar_names=\"\"\"abc, 1\"\",RCHASC6A"

[{"Product":{"code":"SSB6AA","label":"Power System Hardware Management Console Physical Appliance"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"HMC","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Historical Number

467230449

Document Information

Modified date:
22 September 2021

UID

nas8N1014052