#!/bin/bash for i in `cat egyiklista`; do LOFASZ=`grep $i masiklista`; if [ "$LOFASZ" == "" ]; then echo $i; fi done