Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to be able to copy/paste into terminal;

tar -xzvf latest.tar.gz
mv wordpress/* .
rmdir wordpress
rm latest.tar.gz

But I want correct wait commands in there so it doesn't try to move the wordpress directory before it's finished extracting.

share|improve this question
up vote 3 down vote accepted

You don't need any "wait" command, it's fine as it is. Your tar command is not being backgrounded, so the script has no choice but to wait for it to finish before executing the next command.

Take a look at this thread for example:

share|improve this answer
Thanks @duDE, good to know. – SMacFadyen Sep 5 '13 at 11:33

You must log in to answer this question.

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