Unix challenges

Have fun! Submit new challenges and solutions to old ones to unix@current_domain. You should replace current_domain with enpo.no :)

Challenge 4: Common IPs

2018-08-26 19:32:50 — Adrian Kjær Dalhaug

Print the IPs/hostnames that appear in both ./input1.txt and ./input2.txt. The IP or hostname is the first field on each line.

Input example


131.235.117.31 - - [01/Aug/1995:00:16:17 -0400] "GET /icons/blank.xbm HTTP/1.0" 200 509
ad10-015.compuserve.com - - [01/Aug/1995:00:16:43 -0400] "GET /shuttle/missions/51-l/mission-51-l.html HTTP/1.0" 200 6658