Skip to content

Commit

Permalink
.af += set difference with comm
Browse files Browse the repository at this point in the history
  • Loading branch information
awdeorio committed Oct 6, 2023
1 parent a2cfb67 commit cc79e78
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .always_forget.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1324,7 +1324,9 @@ dc -e "3 k 1 2 /p" # floating point
sort file1 | uniq # unique patterns
sort file1 file2 | uniq # set union
sort file1 file2 | uniq -d # set intersection
comm -12 <(sort file1) <(sort file2) # set intersection
sort file1 file2 | uniq -u # set symmetric difference
comm -23 <(sort file1) <(sort file2) # set difference (lines only in file1)
diff <(sort file1) <(sort file2) # set equality
cat FILE | sort | uniq -c # frequency analysis (histogram)
factor NUM # print prime factors
Expand Down

0 comments on commit cc79e78

Please sign in to comment.