Im using in the command line for 3 commands and I since that I'm doing that over and over again I want to build some script, the problem is like following :
This is what Im doing
1 . cd
Commands are normally executed in sequence.
For example the
tar command in your question,
while it's running,
you cannot start running something else.
You have to wait for it to complete.
As such, you can simply list the commands you want to do in your script, and they will be executed one after another. It doesn't matter if one commands takes 2 seconds or 22, the next command will not run until the previous is completed.
set -e cd users/home/d56789/tmp tar czf ../fts/runnerer.tar App/ cd ../fts cf update-run myBP -p /home/d56789/fts/ -i 4 cd ../myapp cf push
I added the
set -e at the top for your safety.
What it does is, if any of the commands fail,
the script will exit without executing the rest.
If you really actually need a delay for some reason (I don't see such reason in your question),
then you can use the
It takes the number of seconds as parameter,
so to sleep 10 seconds run
to sleep 5 minutes run