I have 2 files which contain IP addresses
1st File:
192.168.1.1:4.4.4.4
192.168.1.2:4.4.2.2
192.168.1.1:8.8.8.8
4.4.8.8:192.168.1.6
192.168.1.4:4.4.8.8
2nd file:
4.4.2.2
4.4.8.8
Now I want a script which takes each value from file 2nd and checks and if that values is present in files 1st. If the value is present it should print the entire line from file 1st.
For example desired result from above example:
192.168.1.2:4.4.2.2
4.4.8.8:192.168.1.6
192.168.1.4:4.4.8.8
:
-delimited fields? ... or just in the second field? Is the order of the lines in the output significant?