Community discussions

MikroTik App
 
lurch
just joined
Topic Author
Posts: 23
Joined: Mon Jan 24, 2022 5:45 pm

using find in expect script

Tue Feb 21, 2023 11:20 am

Via the cli i use the follwoing command
interface bridge port set [find where bridge=bridge and interface=ether5] pvid=123
however i'm having a problem executing it via a script form a remote machine.
send "interface bridge port set [find where bridge=bridge and interface=ether5] pvid=123";
returns
Password: invalid command name "find"
    while executing
"find where bridge=bridge and interface=ether5"
    invoked from within
"send "interface bridge port set [find where bridge=bridge and interface=ether5] pvid=123""
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: using find in expect script

Tue Feb 21, 2023 11:54 am

however i'm having a problem executing it via a script form a remote machine.
How is executed?

The correct syntax is:
/interface bridge port set [find where bridge=bridge and interface=ether5] pvid=123
Starting with the "/", not needed on "find", is implicit "/interface bridge port"

If you do some commands before, probably is not on root "/" the current "working directory"

Who is online

Users browsing this forum: esicgg and 15 guests