Você pode usar o awk:
$ awk -F':' -vOFS=':' 'NR==FNR{a[]=;next}{print in a?a[]:"not found",}' file1 file2
hari:1.2.3.4/32
abc:3.4.5.6/24
bcd:8.9.10.11/34
not found:10.12.34.0/22
not found:1.4.5.7/34
Em um formato mais legível:
awk -F':' -vOFS=':' 'NR == FNR { # For the first file (file1)
a[] = # store the first token in an array
# using the second token as the key
next # skip to the next record
}
{ # For all lines of file 2
print in a ? a[] : "not found" , # print the desired result
}' file1 file2