Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
帮我运行命令
tmsh list cm device-group one-line | awk '{print $3}'
在期望中,这是用于 F5 负载平衡器的
当我在 HPNA 中运行它时,我得到了
can't read "3": no such variable while executing
单引号在 Tcl/expect 中没有特殊含义。你会想要
tmsh list cm device-group one-line | awk {{print $3}}
虽然这看起来很奇怪,但外大括号是 Tcl 的非替代引号,而内大括号是 awk 的。