Command to execute commands one after other

I am writng a script in which there is an installation file.The installer runs good. But after the installer command there are some files and commands which are based on those installed files. Now problem is the commands get executed before the installer is totally installed. So is there any command which stops the execution other commands untill the installer is completely done.

suppose installer is ./runinstaller -silent

cp /root/user/(installed file)

problem is installed file is executed before run installer is completely installed
error :cant find the file

nohup ./runinstaller -silent 2&>1 > nohup.out &
wait

runinstaller is now background process, waited for by your command line process

Probably that install script runs some other scripts or processes in the background and it is not waiting for them to finish. You can use this line of code to halt your script until the file apears (but it may not be copied completely, so add some sleep timeout after that).

while :; do if [ -f ~/test ]; then break; fi; done

its takes 72 minutes for installation. so is wait a command . If so wats the syntax to wait for specific time to execute the further commands

./runinstaller -silent
wait

---------- Post updated at 10:25 AM ---------- Previous update was at 10:08 AM ----------

or is there way to find process Id of that installer and wait until the process is done

Try using 'fuser' to determine if the file has been completely copied.