First off, I appreciate any and all help in answering this question. I have a command in a bash script that will output the following:
255 254 253 252 ... 7 6 5
I've always found this site useful when fiddling with shell scripts: http://tldp.org/LDP/abs/html/
you'll have to get your output into an array using some sort of string manipulation using the spaces as delimiters, then loop over that to build some html output - so the return value will basically just output your select box on the page where you execute your cgi/bash script.
-sean