echo "Installing software"
apt-get -y install etc etc
echo "Software Installed"
How do I make the script wait for the above process to finish before starting the next one? I saw something about wait $! would this do it?
Why would you assume that the process in your script will return your prompt before
it is done? Like all (unix) commands, you will only get your commandprompt back after a command or process is complete. The only exception is when you specifically start a process as a background process.
echo "Configuring Network"
echo "# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
iface lo inet loopback"
echo "Network Setup Complete"
It creates the interfaces file but it's blank? probably to do with how i've done the > or using " any ideas?
Try putting the output redirection (> /etc/network/interface) on the same line where your echo command ends.
Putting it on a new line will output 'nothing' to your filename, just as you request.
Also i'll need to configure install various modules will I have to 'wait' after each one ie
apt-get -y install libusb-dev
cpan -fi Bundle::CPAN
cpan -fi ExtUtils::MakeMaker
cpan -fi Inline::MakeMaker
cpan -fi Device::USB
Again, why are you assuming that these commands would be run simultaniously instead of one after the other? The 'wait' command is only used to wait for processes that have specifically been started as a background process. As you have not started these as background processes, each command will only start after the previous one is finished.