I have a file with all the tests name:
$ cat all_tests.txt
test1
test2
test3
test4
test5
test6
And another file containing the test names and the associated result:
$ cat completed_tests.txt
test1 Passed
test3 Failed
test5 Passed
test6 Passed
How to create a new file containing all the test names with the associated result without duplicates?
If I execute:
sort all_tests.txt completed_tests.txt
The output contains duplicates:
test1
test1 Passed
test2
test3
test3 Failed
test4
test5
test5 Passed
test6
test6 Passed
The desired output:
test1 Passed
test2
test3 Failed
test4
test5 Passed
test6 Passed