Rajesh,
It would help if you posted more details...
1. OS type (Linux, AIX, HP-UX, etc)
2. Shell "language" (KSH, CSH, BASH, etc)
Be as detailed as you can describing your requirements.
Also, if you can post your script or at least the portions of
it that you are having troubles with. This way, you can get
very specific responses from me and others.