#!/bin/bash
while read file1 <&3; do
while read file2 ; do
if [ $file1 == $file2 ] ; then
$file1 >> /infanass/dev/admin/test/newlist.txt
fi
echo "$file1"
echo "$file2"
done 3</infanass/dev/admin/test/file2.txt
done 3</infanass/dev/admin/test/file1.txt
I want to read one line from file1.txt and then loop through file2.txt and see if there is a match and if there is write it out too a new text file..
I think I have a infinite loop..