comm -13 <(sort -u file_1) <(sort -u file_2)
Este comando exibirá linhas exclusivas para file_2
. Portanto, se a saída estiver vazia, todas as linhas file_2
estarão contidas no file_1
.
Do homem do comm:
With no options, produce three-column output. Column one contains lines unique to FILE1, column two contains lines unique to FILE2, and column three contains lines common to both files. -1 suppress column 1 (lines unique to FILE1) -2 suppress column 2 (lines unique to FILE2) -3 suppress column 3 (lines that appear in both files)