Shell scripts error

Dear all

I have shell script where files have been organized into directory, i pass the directory name and it shold pick all the files within the directory and move to differnet path.

When i run the scripts it doesn't move and come out with error and i am not able to understand it

the error is

mv: Insufficient arguments (1)
Usage: mv [-f] [-i] f1 f2
mv [-f] [-i] f1 ... fn d1
mv [-f] [-i] d1 d2

scripts is

 
#this shell will loadd all the LOG files data in oracle
# The below line will copy the logs to respective forlder so tha ETL will read the LOGS from there.
  NEWDIR=RIO_16-Oct-2012
        cd /ersdg3/ERS/ERS_INPUT_LOGS/RIO/LOGS/
 if [ -d $NEWDIR ]; then
         echo "Directory exis $NEWDIR"
 else
          mkdir /ersdg3/ERS/ERS_INPUT_LOGS/RIO/LOGS/$NEWDIR
 fi
 cd /ersdg3/ERS/ERS_INPUT_LOGS/RIO/rio_archive/$NEWDIR/
 #touch -t `date +%Y%m%d0000` dummy
 #find . -newer dummy -type f  |
 while read fname
 do
     mv $fname /ersdg3/ERS/ERS_INPUT_LOGS/RIO/LOGS/$NEWDIR
 done
 cd /ersdg3/ERS/ERS_INPUT_LOGS/RIO/LOGS/$NEWDIR
 for i in *.LOG
 do
 wc -l $i | awk '{ print $1"|"$2"|RIO" }'
 done>RIO_AUDIT_REC.TXT

Any help will be greate help. there is no iussue of privileges

Your while loop does not have any input, hence fname variable is not assigned, supply an input like below:-

while read fname
do
     mv $fname /ersdg3/ERS/ERS_INPUT_LOGS/RIO/LOGS/$NEWDIR
done < input_file
while read fname
 do
     mv $fname /ersdg3/ERS/ERS_INPUT_LOGS/RIO/LOGS/$NEWDIR
 done<RIO_AUDIT_REC.TXT

 for i in *.LOG
 do
 wc -l $i | awk '{ print $1"|"$2"|RIO" }'
 done