Thanks once again for your help. That is another way to accomplish the problem that i was having. However i have worked out a simple solution.
Where i was trying to substitute UG=* with UG="$INC" etc.....within shell i found you can use .* for all occurrences so i used UG=.*/UG="$INC" and presto....she works
I have finally got the program working 100 % with error checking. thanks heaps