#!/bin/sh for ADDI in $(cat liste1) do echo "Entferne; " $ADDI "aus liste2" grep -v $ADDI liste2 > liste.tmp mv liste.tmp liste2 done