LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Script for scaning files (https://www.linuxquestions.org/questions/linux-newbie-8/script-for-scaning-files-562490/)

bhandu 06-17-2007 04:14 PM

Script for scaning files
 
I have developed a shell script which will scan two files and then put the similar records in a third file.The script is follows


rm $filename3
touch $filename3

exec < $filename1

while read line
do
exec <filename2
while read line1
do
if [ $line -eq $line1 ]
echo $line >> filename3
end if
done
done

But the above shell script is not working.
Could anyone help me out?

acid_kewpie 06-17-2007 04:25 PM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.


All times are GMT -5. The time now is 11:06 PM.