spamhaus icon indicating copy to clipboard operation
spamhaus copied to clipboard

Improvement : awk '!/^;/{print $1}' drop.lasso better than cat grep awk

Open supersophie opened this issue 7 years ago • 1 comments

Hi,

On line 49, save yourself two processes. Use this instead. You don't need the cat and grep. We can do this with just awk, e.g

awk '!/^;/{print $1}' $FILE

Ciao,Sophie

supersophie avatar Feb 15 '18 22:02 supersophie

Final line equals:

# iterate through all known spamming hosts
for IP in $(  awk '!/^;/{print $1}' ); do

supersophie avatar Feb 15 '18 22:02 supersophie