Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 5 down vote accepted

sleep <seconds>

share|improve this answer

Use sleep 60 for 1 min.

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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