On Thu, 12 Oct 2006 15:41:12 -0500, Michael Sullivan wrote: > while read LINE > do > whois $LINE | grep 'abuse' &> /dev/null > if $? != 0; then > echo "$LINE" >> noabuse.txt > fi > done < iplist > > I'm getting "command not found" on the if line. The if line should be "if [ $? -ne 0 ]; then" Or you can put grep directly into the if statement, since you are only testing its result anyway if whois $LINE | grep -q abuse; then -- Neil Bothwick There are some micro-organisms that exhibit characteristics of both plants and animals. When exposed to light they undergo photosynthesis; and when the lights go out, they turn into animals. But then again, don't we all?