A shell script is basically a bunch of command lines strung together. The same rules apply. You can put the nice in front of the gw command line in the script or you can put it in front of the script when you run it. Doing the latter will make everything in the script run at nice level.