path: abs-guide_10-4/HTML/part4.html >pidof
/dev/null suppresses unwanted error messages. # # Can grep "$PROCESS_NAME" be replaced by pidof "$PROCESS_NAME"? # --------------------------------------------------------------- path: abs-guide_10-4/pid-identifier.sh # fi # To simplify the entire process, use "pidof". path: abs-guide_10-4/spawn.sh PIDS=$(pidof sh $0) # Process IDs of the various instances of this script. P_array=( $PIDS ) # Put them in an array (why?). echo $PIDS # Show process IDs of parent and child processes. path: abs-guide_10-4/HTML/procref1.html 37 # fi 38 39 # To simplify the entire process, use "pidof". 40 41 path: abs-guide_10-4/HTML/procref1.html 6 7 # Identify PID. 8 pid=$( echo $(pidof "$1") | awk '{ print $1 }' ) 9 # Get only first ^^^^^^^^^^^^^^^^^^ of multiple instances. 10 path: abs-guide_10-4/HTML/procref1.html 17 # However, as Oleg Philon points out, 18 #+ this could have been considerably simplified by using "pidof". 19 # pidno=$( pidof $PROCNAME ) 20 # 21 # Moral of the story: path: abs-guide_10-4/HTML/procref1.html 16 # 17 # However, as Oleg Philon points out, 18 #+ this could have been considerably simplified by using "pidof". 19 # pidno=$( pidof $PROCNAME ) 20 # path: abs-guide_10-4/connect-stat.sh # # However, as Oleg Philon points out, #+ this could have been considerably simplified by using "pidof". # pidno=$( pidof $PROCNAME ) # path: abs-guide_10-4/connect-stat.sh # However, as Oleg Philon points out, #+ this could have been considerably simplified by using "pidof". # pidno=$( pidof $PROCNAME ) # # Moral of the story: path: abs-guide_10-4/HTML/index.html >pidof helps kill a process