I am running RHEL 6.5
I want to use a single command that will switch user, and then start a program that is only available within that user's environment.
Normally I would use two commands
su - mqm
runmqsc AAA < test.mq
I want to use a single su or sudo command to both switch to mqm, and then start up a program.
How would I write such a command ?