2 commands in one line

Hello,

This is my first post here and I am beginner in the Mikrotik world so please be patient with me.

I am trying to make the following command work:

/ip dhcp-client add interface=ether1 disabled=no; quit;

basically just configure dhcp on ether1 and disconnect in one line. I’ve read 2 other topics on this but it seems that this sequence does not work for me.
I am using CHR 7.7(but should work on generic mikrotik OS). The commands executes but does not quit, how to achieve this?

Thanks

why quit?
Just close terminal…

I am scripting this from outside mikrotik and I need a clean exit preferably.

And why no-quit would be a dirty exit? Where did you read it?

But on that line I don’t see any errors, except the missing “:” before quit.
But it’s only relevant if the script line is executed within a more complex script or after some previous commands.

Doesn’t CHR add a DHCP client automatically?

I've just seen it, its trashing my bash terminal.

Yes but I want my script to work for other router os images too.

Do you add the : as suggested?

Yes, not working:

/ip dhcp-client add interface=ether1 disabled=no; :quit;

Not working?

What you obtain on terminal, and what you exactly expect?

I will come back a little later, I had an error in my script. I need to fix it and come back to reply later.