Issue multiple commands to Karaf console from bash

I need to issue multiple commands to karaf from bash. I have this shell script which works just fine, but I think I should be able to do this without having to login to the console for each command:

openhab-cli console -p habopen bundle:stop 
sleep 1s
openhab-cli console -p habopen bundle:start

I’ve tried this:

openhab-cli console -p habopen bundle:stop && bundle:start

But it seems that after the first command is issued, the console connection is closed, so the second command is passed to bash, and of course, fails.
Any ideas appreciated

Try semicolon: command 1;command 2.

Standard karaf allows to pass script file to Then each line is executed in same session.

nearly. Put quotes arround the command:

openhab-cli console -p habopen "command1; command2"

otherwise the second command will be executed in the local shell not in opehanb client.

It works now. Thanks all.