To use the function, call it as written at the point in your script where you would do your awk {print $3}, etc.. line
The first parameter is the name of the file you wish awk to read from,the second parameter is the tmpfile you want
results written to. The result of reading field three is
exported into your shell global environment if not empty and can be accessed as the variable out:ex: echo $out.
ex:
getthree /home/myfile /home/tmp.out
echo $out