[root@VM_180_248_centos ~]# tccli cvm DescribeZones{"TotalCount": 4,"ZoneSet": [{"ZoneState": "AVAILABLE","ZoneId": "100001","Zone": "ap-guangzhou-1","ZoneName": "广州一区"},{"ZoneState": "AVAILABLE","ZoneId": "100002","Zone": "ap-guangzhou-2","ZoneName": "广州二区"},{"ZoneState": "AVAILABLE","ZoneId": "100003","Zone": "ap-guangzhou-3","ZoneName": "广州三区"},{"ZoneState": "AVAILABLE","ZoneId": "100004","Zone": "ap-guangzhou-4","ZoneName": "广州四区"}],"RequestId": "4fd313a6-155f-4c7a-bf86-898c02fcae02"}
[root@VM_180_248_centos ~]# tccli cvm DescribeZones --filter TotalCount4
zsh: no matches found: xxx
,这时需要将说明过滤行为的内容用单引号包裹起来。[root@VM_180_248_centos ~]# tccli cvm DescribeZones --filter ZoneSet[0]{"ZoneState": "AVAILABLE","ZoneId": "100001","Zone": "ap-guangzhou-1","ZoneName": "广州一区"}
[root@VM_180_248_centos ~]# tccli cvm DescribeZones --filter ZoneSet[*].ZoneName["广州一区","广州二区","广州三区","广州四区"]
[root@VM_180_248_centos ~]# tccli cvm DescribeZones --filter 'ZoneSet[*].{name:ZoneName, id:ZoneId}'[{"name": "广州一区","id": "100001"},{"name": "广州二区","id": "100002"},{"name": "广州三区","id": "100003"},{"name": "广州四区","id": "100004"}]
本页内容是否解决了您的问题?