这个问题可能是这个问题的重复,但我面临的问题与那个答案无关。我已经尝试了人们在那里发布的代码,但我无法实现我想要的。我的代码:
set line H_Dev: Issue with DELETE funtion in OSPF OC (Input List is missing required key "identifier")
foreach {name value} [string map {( { } ) {} } $line] {
puts "$name $value"
}
上面的代码不起作用,但在我包含 { } 之后
set line {H_Dev: Issue with DELETE funtion in OSPF OC (Input List is missing required key "identifier")}
它的工作方式是这样的
H_Dev: Issue
with DELETE
funtion in
OSPF OC
Input List
is missing
required key
identifier
但在我的脚本中,$line 仅在列表中。如何获得这样的纯文本
H_Dev: Issue with DELETE funtion in OSPF OC Input List is missing required key identifier