#!/bin/sh
#] 
#] *********************
#] $ bash  "$d_bin""lists compare - diff & comm.sh"  -  lines [not in one, common to] file1  file2
# www.BillHowell.ca  12Dec2019 initial based on
#         "/media/bill/PROJECTS/System_maintenance/Linux/lists compare - diff & comm.txt"


#******************
# setup

d_1="/media/bill/SWAPPER/2020 WCCI Glasgow/mass emails/"

#f_1="191212 CEC 21 special sessions online.txt"
#f_2="191212 CEC 30 special sessions.txt"

f_1="191212 IJCNN special sessions online.txt"
f_2="191212 CEC 30 special sessions.txt"

#******************
# standard processing

sort  -u  "$d_1""$f_1"  >"$d_temp""$f_1"
sort  -u  "$d_1""$f_2"  >"$d_temp""$f_2"

echo ""
echo ""
echo "lines of file1 not in file2 : "
diff  "$d_temp""$f_1"  "$d_temp""$f_2"  | grep '^>' | sed 's#^>\ ##'
echo ""
echo ""
echo "lines of file2 not in file1 : "
diff  "$d_temp""$f_2"  "$d_temp""$f_1"  | grep '^>' | sed 's#^>\ ##'
echo ""
echo ""
echo "lines common to both file1 & file2 : "
comm -12  "$d_temp""$f_1"  "$d_temp""$f_2"




# enddoc
