Windows has done something, so don't go running to a shrink yet. ;-) Run "cat -vet rc.firewall.new" and you will see ^M characters at the end of each line. This is the carriage return character that MS-DOS adds to the end of each line in addition to the newline character. You might also see a ^Z at the end of the file.
When you fire up vi, you are probably actually running vim. Unlike the original vi, vim recognises MS-DOS format files. Check the status line at the bottom of the screen when you first open the screen. It probably say "MS-DOS file".
So, when you try to run the script which looks like it has "#!/bin/sh" as the first line, the shell is actually trying to run "#!/bin/sh^M" as the command interpreter.
I had this problem with a file last week, and it drove me mad until I noticed the "MS-DOS file" hidden away on vim's status line. Oh yeah, this text disappears when you start moving around in the file, so it's easy to miss when you jump in and start hacking around the file looking for the problem...
Two ways of fixing it. If you have the mtools (I think) package installed, you should have a command called "dos2unix". Run it as "dos2unix rc.firewall.new" and it does the conversion for you.
Alternatively, pass the script through sed:
[tt]
sed -e 's/^M$//' rc.firewall.new | sed -s 's/^Z//g' >/tmp/rc.firewall.new
mv /tmp/rc.firewall.new rc.firewall.new
[/tt]
(Note: To enter the ^M and ^Z characters from the command line, press Ctrl-V then Ctrl-M, for example, to get the control code entered. Also, exercise for the reader: Create your own dos2unix shell script...)
On the editor front, I've got a few personal favourites. First is vi/vim for all general editing tasks. It's got cut & paste, and there's a graphical version available. Try running "gvim". If it's not installed, get your distro CD and install the vim-X11 package.
For big programming jobs I tend to use xemacs. Even though vim has syntax highlighting, I think emacs does a nicer job of it. There are also a couple of excellent modes in emacs for doing programming work.
On the GUI editing front, there's a program called "nedit" that has a lot of fans. I tried using it for a while, but was put off because it was a little bit too "windowsy" for me.
In Windows, I can recommend the excellent Programmer's File Editor (PFE32). Although, the Windows version of Vim and Emacs tend to get a little more use.
Hope this helps.