Issue
I have 2 fixed-length flat files F1 and F2 containing data (id, A, B) and (id, C, D) respectively.
I am trying to instantiate an object Foo f = new Foo (id, A, B, C, D).
How can I achieve this feat with spring batch. I don't have access to any DB so I can't insert Foo(id, A, B) into a staging table and then update the missing values.
Thank you so much :)
Solution
Thank you Mahmoud Ben Hassine, using an awk script solved my issue, here's my script
awk 'NR==FNR
{dossier[$3] = $0;next}
{
printf("<client>\n");
printf "<rev>%s</rev>\n<pdd>%s</pdd>\n",$0,dossier[$9];
print("</client>")
}' pdddos.txt revass.txt > output.txt
sed -i '1s/^/<clients>\n/' output.txt
sed -i -e '$a</clients>' output.txt
Answered By - Zidani Mehdi
Answer Checked By - Terry (JavaFixing Volunteer)