1

I have a script which copies(scp) .war file to tomcat's webapps and the .war file extracts creating a folder under webapps directory on a ubuntu system. My next line of the script is restarting the tomcat which is executed immediately before the .war is extracted and this causing problem with

Is it possible so that it waits for few seconds/minutes before it executes the next line of the script. The script is of normal ubuntu commands.

10

sleep <seconds>

1

Use sleep 60 for 1 min.

1

Command sleep allows you to insert breaks to your scripts. For example, sleep 10 would wait 10 seconds before proceeding.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.