Michelle let us know the exact command you typed on the command line, perhaps, as mwright has suggested, you may have simply redirected the output of your script to another file, however it does look as though you have redirected the output from something else to your script, and hence ovewritten it
Don't worry! When I first delved into shell scripting, I had written a 1500 word beautifully streamlined script with sed and awk statement that performed a number of functions, it took me 2 weeks - then the HP 712/60 it was on died
And along with it so did my script. But alas losing that script actually taught me a lot more as I had to write it again and picked up even more skiils as my knowledge of scripting increased!
...Just a little anecdote to show you that you have not been the first, and you wont be the last
Regards.