All pastes #74535 Raw Edit

Unnamed

public text v1 · immutable
#74535 ·published 2006-06-29 04:21 UTC
rendered paste body
cat $VUT_LOCATION | while read i
do
        ((total++))

        echo "Checking virtual user $i"

        seen=0

        cat $LHN_LOCATION | while read x
        do
                echo "$(echo $i | cut -d'@' -f2 | cut -d' ' -f1) = $x?"

                if [ $(echo $i | cut -d'@' -f2 | cut -d' ' -f1) = $x ]; then
                        ((seen++))
                fi
        done

        echo $seen

        if [ $seen -eq 0 ]; then
                echo $i >> invalid-users.log
                echo "No domain match found for $i"
                ((lost++))
        else
                echo $i >> virtusertable.log
                echo "Domain match found for $i"
                ((found++))
        fi

        echo ""
        echo "-----------------------------------------"
        echo ""
done