On Sun, Oct 6, 2024 at 8:25 PM American Citizen <[email protected]> wrote: > > To all: > > I have a simple batch file which has 6 CLI commands to it > > gp -q < xaa > xaa.results & > > gp -q < xab > xab.results & > > gp -q < xac > xac.results & > > gp -q < xad > xad.results & > > gp -q < xae > xae.results & > > gp -q < xaf > xaf.results & > > When I do a simple "% bash do-x.sh" which is the bash script, it runs > normally > > but due to the redirect commands, doing the "ps -fx" will only return > the gp command (along with all live commands the system is running) but > I don't know which xaa, or xab, or xac, etc it is associated with. > > Is there some way to do a "ps -fax | grep gp" command which locates > exactly the pids involved? And can these results be returned as a simple > ascii file, so I can do future inquiries to determine when the program > has stopped running? > > The goal here is to determine when all 6 programs running "gp" have > terminated. > > Randall > >
Since bash runs them all 6 commands sequentially you can put one more command at the end that tells you all is finished like echo Finished Bill
