Please find sample code
Sample test.ksh :
Below is the code that I have used to run on two users, however when run the script it ust executes the first command and i.e sx su command and stops executing further
#!/bin/ksh
sx su - user1
cat testfile.txt
exit
sx su - user2
cd /bin
ls -lrta
exitmeans exit? Code is working as written. You'll have to either remove the call toexitor make it conditional, ieif [ $? != 0 ] ; then exit ; fi(or similar). Good luck.