"exit 1" tells it to exit with a failing error code.
The || tells it to run the command after it only if the previous command failed.
So, /bin/true || echo asdf would never print anything, but /bin/false || echo asdf would always print. And command || exit would exit only if 'command' failed.
Let me make it clear. Iam running installer.It should return exit staus that installation is done succeesfully and then we can run the further commands.
---------- Post updated 09-23-10 at 09:40 AM ---------- Previous update was 09-22-10 at 08:44 PM ----------
a) cd /root/user/dir/sd/disk
./runInstaller -silent -responseFile
b) cd /root1/user1
echo "copying"
cp /root/user/dir/sd/disk/ram.txt
now b) executes before a) is successfully done.
so I want b) to start only after successfull completion of a)
when a) has started execution
/...it goes on running like
instaling
memory check passed.
dir check passed
copying ( this is from echo)
locating directory(this is from run installer)
installed succesffully
Now in above you c that while installer is running copying is also done
but I want it the following way
when a) has started execution
/...it goes on running like
instaling
memory check passed.
dir check passed
locating directory(this is from run installer)
installed succesfully
now it should start copying
copying ( this is from echo)
Most likely B finishes before A is down because it set to run in the background. Some silent options will trigger this event. Try running the same setup without the -silent option.