i have this script that launches multiple xterm sessionon a CDE. i would like to test the xterm so that when i execute the script using an ordinary terminal it will detect that it will unable to launch the xterm and execute other script instead.
i tried using trap and exit status. maybe i am doing something wrong. pls help.
i just record the process id (using $!) when i launched the application and wait for a few seconds then check it with the "ps -ef" command. since the box will automatically kill the process if it is not possible to launch the application otherwise it will register in the "ps -ef".