mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
572 B
572 B
comm
comm requires the files it is working with to be pre-sorted.
TL;DR
# Print unique lines of file1 which are not present in file2.
comm -23 <(sort -u 'file1') <(sort -u 'file2')
# Check the whole content of file1 is present in file2.
[[ $(comm -23 <(sort -u 'file1') <(sort -u 'file2') | wc -l) -eq 0 ]]