awk 不排序去重

awk -F'\n' '{for (i = 1; i <= NF; i++){++word[$i];if (word[$i] == 1) printf("%s","\t" $i)}printf("\n")}' newipsect.all.spare.txt| sed -e'/^$/d;s/^\t//g' >  newipsect.all.spare.txt.uniq

gzip -9 newipsect.all.spare.txt.uniq

你可能感兴趣的:(awk 不排序去重)