Passing parameters - Shell -
suppose have folder(f1) below files,
wireport_614.log wireport_615.log boecms12.log boecms13.log
now have code below fetch unique parameters above files using script,
$home/findexceptions_bo.pl < .log >> $home/exceptions.log
so need pass .log files f1(n number of files) 1 one , run above script below,
$./script.sh $home/findexceptions_bo.pl < wireport_614.log >> $home/exceptions.log $home/findexceptions_bo.pl < wireport_615.log >> $home/exceptions.log
please let me know how pass , execute script.
loop on files 1 @ time:
for file in /folder/*.log; $home/findexceptions_bo.pl < "$file" >> $home/exceptions.log done
or concatenate of log files , process them @ once, if that'll work you.
cat /folder/*.log | $home/findexceptions_bo.pl >> $home/exceptions.log
Comments
Post a Comment