Lets say there are 3 java
commands in my shell script:
java com.test.test1 &
java com.test.test2 &
java com.test.test3
I need to get the PID of each and every command once it gets executed and store the PIDs in a file.
Note: I cant use $!
as I'm using sleep
in between.
Can you help me out?