help me to run the command

tmsh list cm device-group one-line | awk '{print $3}'

in expect , this is for F5 load balancer

when i run this in HPNA i'm getting

can't read "3": no such variable
    while executing
1

There are 1 best solutions below

0
On

Single quotes have no special meaning in Tcl/expect. You would want

tmsh list cm device-group one-line | awk {{print $3}}

While that looks weird, the outer braces are Tcl's non-substituting quotes, and the inner braces are awk's.