> I have a short script:
> 
> #!/bin/bash
> 
> 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.  Have I not formatted it
> correctly?  The script is supposed to append $LINE to a file if the
> return code of whois $LINE | grep 'abuse' returns false (not 0)...
> 

Do you need to add 
   if test... 
or if [ ... ]?

Regards,

Richard Broersma Jr.
-- 
gentoo-user@gentoo.org mailing list

Reply via email to