I want to move another shell script B and C simultaneously in a different directory in shell script A.Shell scripts B, C describe running the same program group.
mkdir test1
cd test1
sh B.sh &
cd..
mkdir test2
cd test2
sh C.sh &
cd..
When written and executed in shell script A, as shown in , the program group described in shell script B runs, but the contents of shell script C do not work until it is finished.
The purpose is to shorten the time by running test1 and test2 at the same time, but I would like you to tell me how it works.
shellscript
sh B.sh&
and sh C.sh&
, so they work in the background at the same time.If you are blocked from running C.sh, there may be a problem with the contents of C.sh.
I understand that B.sh and C.sh are running the same program, but isn't the program you're running not allowed to start at the same time, or is there anything else that locks the other program?
Take the sh A.sh
system call trace, including the child process, and you may find out where it is taking you.
※ I didn't actually run it because I don't have a mac environment.
dtruss-e-fsh A.sh
914 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
578 Understanding How to Configure Google API Key
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.