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]