Bash: how to redirect continuous output to text file but make lines unique?
Ok, I have this line that outputs data to a text file. The only issue is I
need the lines to be unique. So, if it is going to add a line that already
exists how can I prevent that? This is my script:
tcpdump -lvi any "udp port 53" 2>/dev/null|grep -E 'A\?'|awk '{print
$(NF-1)}' >> /tmp/domains
Do I pipe it go awk and somehow delete duplicates? Do I have another
script run everyone minute that removes duplicates?
No comments:
Post a Comment