Requirement

I am trying to script and came up with a conclusion that I need a do while loop in my statement. I am stuck with the
do while syntax. I need to use it alongwith the if then else statement. Can I use it is a big question? I actually need to get all the files
that are there from within run_dt to load_dt with the loop.
I hardly use unix can somebody help plz.
I will tell u the requirement.

I am using
load_dt=20090503
run_dt=20090506
diff=load_dt-run_dt
if $load_dt=$run_dt
then get the run_dt file
or else if $load_dt!=$run_dt
then
create a do while loop [ I need to use loop because there a large no. of files] to find the files which are we missed
cp those files
exit

Thanks in advance

Have a read of some scripting tutorials:

http://www.unix.com/answers-frequently-asked-questions/13774-unix-tutorials-programming-tutorials-shell-scripting-tutorials.html

A link found with Google for conditionals and loops:

Ksh basics