How to use find command with sed and awk to remove duplicate IP from files
问题 Howdie do, I'm writing a script that will remove duplicate IP's from two files. For example, grep -rw "123.234.567" /home/test/ips/ /home/test/ips/codingte:123.234.567 /home/test/ips/codingt2:123.234.567 Ok, so that IP is in two different files and so I need to remove the IP from the second file. The grep gives me the file path and the IP address. My thinking: store the file path in a variable with awk and then use find to go to that file and use sed to remove the duplicate IP, so I changed