OK. It seems that your shell is bash.
To write a bash script to do all that, use a text editor to create a script (for the sake of argument, let's call it bfscript.sh).
The first line of the script MUST be #!/bin/bash (the provervial she-bang line).
Then, just type in the commands as you have listed them (one command per line).
For the sake of completeness, include the last line 'exit 0'. Within bash, you can query an app to see if it executed properly. If the exit return is 0, it ran successfully. Any other return means it ended with an error.
For more on writing bash scripts, see:
Bash Guide for Beginners
Advanced Bash-Scripting Guide
PS. If you alrady have a bfscript.sh somewhere, and if that location is not in the user's or root's path, you wil get the "comand not found" error. You must specify the full path to the location of that script, or cd to that subdirectory, then issue the command thusly: ./bfscript.sh. The leading ./ tells bash that the script is located in this directory (if you use the full path, the leading ./ is not necessary).
Last edited by bigrigdriver; 05-09-2006 at 10:45 PM.