May I make a suggestion for Chirag? Find a good book on
the use of Shell (ksh, bash, whatever) and work through the
examples so that you understand it.

No one (well, almost no one) minds answering simple questions
here, but it is understood that due diligence on the part of the
poster would be to first attempt to learn the technology you are
having trouble with.