Shell Script - Change user & run multiple commands
(This may be the wrong forum, apologies if it is)
I'm writing a shell script where the user needs to be changed half-way through then some commands are run by this user. I can do this for one command (e.g. su - X -c "echo 'stuff'"), but doing this for more than one command is proving to be a problem - how would I do this?