You can use the 'source' command to execute a list of commands, for example:
1) Create a file called cmd.txt in your source cmd.txt
// You should see an osgi/list command execute.
(I tested with 184.108.40.206-fuse)
One thing to be aware of (depending on what you want to script): installing a feature or component can take a bit of time and it happens asynchronously to script processing. For example a script to install the JBI feature and then a JBI component:
might fail if it executes the osgi/install before support for JBI components has become available. You may want to break up scripts or add some sleeps if you have this sort of dependency between commands.