Are you asking for help on how to write a bash script or how to use vi?
If you want to write a bash script just write a text file where each line is the command you want to run. You can add more advanced structures like "if" statements and such, and there is a tutorial at http://pegasus.rutgers.edu/~elflord/unix/bash-tute.html
if you don't like it, there are about a bazillion others, just google "bash script tutorial"
As for vi, if you've never used it before I would recommend a different text editor. (Yes, I do know that this invites flames.) Vi is a very powerful text editor. Thus, it comes with a steeper learning curve even though it is very efficient. A great text editor, but using it on your first bash script is a bit like using a ballistic missile on a soup cracker.
I might recommend nano, it has a very WYSIWYG interface and is well suited to small taks. If you aren't bound to the command line you can use any number of graphical text editors. If you are stuck on vi, just google "vi tutorial" and you're sure to come up with a good bit.