Thanks Keith,
(1) Yep, the script is not giving me the value that I need to get.
(2) I am revising my programming skills
(3) In the Bourne shell, after creating the executable version through chmod operation
(4) names.dat file is available
(5) Yes, there is a space between #! and /bin/sh