Shell script to control user initiated processes
- by Gnanam
Hi,
I'm not a shell script expert. I'm looking for a shell script which checks
for maximum number of Java processes (MyJavaStandalone) running in the system
before starting/executing the current Java process.
Example:
Script: /home/myfolder/script.sh
script.sh contains
/usr/java/jdk1.6.0/bin/java MyJavaStandalone >> $DATE.log &
Here, before executing "MyJavaStandalone", if there are already 10 processes
running, then this current process should not be started.