Execute sequential files and store data in single file

1)In a particualr path i have a set of inputfiles like

path:/defaultmis/MonthlyLoads/INFA_EXPORT_022013/map*

example:
1)map_de
2)map_cod
3)map_feg
........and so on

[LEFT] in above path there wil be nearly 15 to 20 files starting with map and in other path i have another file input file /tmp/CMB_DEFAULT/DITMGR_Synonyms.lst.

2)now i should run the script

sh impact_analysis.ksh $path/map_de /tmp/CMB/DITMGR_Synonyms.lst

.

3)when i run above scriptill get one output CSV file.

Like this i should run scrtipt for all files.Then i should consolidate all ouput data(CSV file) into one CSV file and log file should capture the row counts for all outputfiles.

I just tried to write code for above logic:

#!/usr/bin/sh
Scripts=/tmp/CMB_DEFAULT
logfile=/tmp/logfile/
cd  /defaultmis/MonthlyLoads/INFA_EXPORT_022013/
 ls map* > /defaultmis/MonthlyLoads/inputfiles
cd /defaultmis/MonthlyLoads/NEW_INFA_Exports
 ls map >> /defaultmis/MonthlyLoads/inputfiles
 while read line 
do
sh Impact_Analysis.ksh  $line /tmp/CMB_DEFAULT/DITMGR_Synonyms.lst >> MB_Project_Impactanalysis.csv
MB_Project_Impactanalysis.csv | wc -l  >>logfile

end

please help and correct me if i am wrong.

[/LEFT]

While your requirements are far from being clear (to me, that is), there's a few comments on your code snippet:

1) Use code tags!

2) Where do you read "line" from?
3) your Analysis script has the ksh extension. Are you sure you want to run it with sh ?
4) Your wc -l line doesn't work as you typed it - make it wc -l filename
5) You don't need all that ls ... > redirection - make it for line in map*

sorry for the confusion,please tell the code for my requirement which mentioned above.

dnt consider my code.

logfile="/tmp/logfile"

for map_file in /defaultmis/MonthlyLoads/INFA_EXPORT_022013/map*
do
    ./Impact_Analysis.ksh "$map_file" "/tmp/CMB_DEFAULT/DITMGR_Synonyms.lst" >> MB_Project_Impactanalysis.csv
done

wc -l MB_Project_Impactanalysis.csv >> logfile

thanks,its working fine.