Problem description:
I have two sets of files in two separate directories. You need to write a script that will merge (line by line) the two files and output the new data into a 3rd new file in a new directory, you will also need to sort the data, remove duplicates from that line, and remove extra spaces so there is only one space between each item.
You need to do this with multiple lines and multiple files in the directories so its needs to be automated.
Example.
file A1
line 1 - aaa bb cccc mm
line 2 - aa bbb mm
file B1
line 1- dd o zzzzz 3 cccc
line 2- c o zzz mm
the new file that will be created
file C1
line 1- 3 aaa bb ccc ddd mm o zzzzz
line 2- aa bbb c mm o zzz
Thanks