Added setCommand function and added example of using it

Signed-off-by: Michel Verbraak <miv@localhost.localdomain>