Need automated shell script please

I'm totally new to shell scripting and I would like to ask your help

1.i want to have a .sh script where it runs opening 2 applications one after another

2.i have 2 applications in
/applications/app1
/applications/app2

  1. want this script to launch app1 for 20 seconds and get killed and automatically run app2 for another 20 seconds and get killed
    . these applications are OpenGL applications.

  2. i have a demo tomorrow and i have to automate this by running the apps continously one after another

please IF you can give me the complete syntax of the .sh script for running this..it would be a great help for me...Thank you very much

#!/bin/sh

/applications/app1 &
sleep 20;
kill $!;
/applications/app2 &
sleep 20;
kill $!;

paste this in a script and run this. hope this helps you.

worked like a charm,,thank you very much pradeep