Shell Script Produces Several Child Processes
Last updated on JANUARY 02, 2016
Applies to:Solaris SPARC Operating System - Version 8 2/04 U8 and later
Information in this document applies to any platform.
A shell script may try to verify that it is the only copy running by doing something similar to "ps -ef | grep script | grep -v grep | wc -l" and expecting the value to be 1
An example would be:
working_num=`ps -ef |grep test-ra.sh |grep -v grep|wc -l`
if test $working_num -gt 1
echo "Another process_check.sh script is still working..."
N/A or anything that changes the timing
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms