what I want to do is find a pid.
Grep the number to a new variable ($PID)
then kill that process.
my broken attempt
it error says:
wrong # args: should be "set varName ?newValue?"
while executing
"set varReturned send -- "ps -A |grep rad\r""
(file "restart.exp" line 26)
Being this is my first expect script I am clueless on how to fix this
Grep the number to a new variable ($PID)
then kill that process.
my broken attempt
Code:
set varReturned send -- "ps -A |grep rad\r"
set PID "$varReturned |grep ([0-9]*)"
send -- "sudo kill $PID\r"
it error says:
wrong # args: should be "set varName ?newValue?"
while executing
"set varReturned send -- "ps -A |grep rad\r""
(file "restart.exp" line 26)
Being this is my first expect script I am clueless on how to fix this