【发布时间】:2017-08-16 09:45:24
【问题描述】:
干杯, 我正在编写一个工具,它应该获取具有特定前缀的所有属性并将它们保存到一个数组中。
当我单独使用 listAttr 时,它给了我这样的信息:
// Result: message caching isHistoricallyInteresting nodeState...
我的问题:我想将带有特定前缀的属性列表保存到数组中
梅尔代码:
string $currentSelection[] = `ls -sl`;
string $currentAttributes[];
$currentShapeNode = `ls -shapes -dag -sl $currentSelection`;
string $currentAttributes[] = `listAttr -ct "ai*"`;
print $currentAttributes;
$currentAttributeslist 保持为空。我无法弄清楚我做错了什么。
【问题讨论】: