Looking to perform an inner join on two different text files. Basically I\'m looking for the inner join equivalent of the GNU join program. Does such a thing exist? If not,
You may modify this script:
cat file2 | while read line; do
grep $line file1 # or whatever you want to do with the $line variable
done
while loop reads file2 line by line and gives that line to the grep command that greps that line in file1. There're some extra output that maybe removed with grep options.