Skip to content

User statistics COMMpare email

dickgroenenberg edited this page Dec 8, 2020 · 2 revisions

Obtain mail list (with only active users if desired) and sort.
If taken from User_statistics the first column can be obtained with awk:
awk '{print $1}' input_1.txt | sort -n > List_1_sort.txt
awk '{print $1}' input_2.txt | sort -n > List_2_sort.txt

Compare these lists with comm (not diff):
comm List_1_sort.txt List_2_sort.txt

If you want the additions/removals from one of these pipe the output
of the last command to grep (start or -v exclude starting with tab)
and number if the amount of addresses is required:
egrep -v "^\t" | cat -n

Clone this wiki locally