Unix command to read input twice and echo on a match