5

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.

3 Answers 3

14

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .