Well, first off, 'ls *.2.txt' won't spit out the contents of the file(s), it will only list the file name(s), then pass that to gawk. You need to 'cat' the file to read out the contents. I also can't guarantee that your syntax for gawk will do what you expect it to without trying it. Then on top of that, even if it gave you the output you were expecting, just redirecting it to a file and adding that header won't make it run. You'll probably need to use chmod to add the execute bit before it will do anything, and I suspect it isn't going to do what you want.
You really want the script to read one value at a time from the file, then manipulate it and output the results, either to the screen or to a file.
What you really want to do is find a book or tutorial on shell scripting to learn how to do this, or even better, look into Perl to do this.