Linux Tips and Tricks ( grep remove hashes and blank lines )

Video is ready, Click Here to View ×


Dear YouTubers in this video i will show you a neat trick of grep.
Please comment.
Join our facebook group
Thanks,
Sal

2 Comments

  1. Just a suggestion for one of next videos:

    From time to time I add some IP addresses into the iptable to block them. In my practice it had be happend, that I added same IP address more than one time. If I save the content of iptable to a File, I look in the file about duplicate entries with this command: "uniq -d rules.v4".

    If I have i.e. in Line 10 a IP addresses and in line 11 the same IP address, the command will work perfectly and show me the duplicate entry. Otherwise, if I have the IP address of line 10 also in line 15, the uniq command doesn't show me the duplicate, I need first to sort the file to get the wanted entries. Maybe you have a good solution for this small problem?

Leave a Reply

Your email address will not be published.


*